mori icon indicating copy to clipboard operation
mori copied to clipboard

Consider to add `vec` function

Open ivan-kleshnin opened this issue 10 years ago • 1 comments

Task: add single element to the front of the vector.

Current solutions:

vector.apply(null, intoArray(cons("a", vector("b", "c"))));
vector(...intoArray(cons("a", vector("b", "c"))));

are overcomplicated.

Expected solution:

vec(cons("a", vector("b", "c"))); 

I was surprised to not find vec function from Clojure core.

ivan-kleshnin avatar Apr 29 '15 09:04 ivan-kleshnin

I think .vec is available, just not documented? I certainly see this: https://github.com/swannodette/mori/blob/master/src/mori.cljs#L8

ashnur avatar Mar 30 '16 11:03 ashnur