(->list mapper-fn col)
Returns a new [[java.util.List]] containing the result of applying mapper-fn
to each item in col
.
Returns an unmodifiable list.
Note: This will usually be faster than (mapv mapper-fn col)
because:
- This function allocates a new [[java.util.ArrayList]] in the exact (.size col)
size, and then
fills it with the mapped values.
- If the underlying collection is not a Clojure sequence, then mapv
will first convert it
to a Clojure sequence and then map over it. This function will not do that.
Returns a new [[java.util.List]] containing the result of applying `mapper-fn` to each item in `col`. Returns an unmodifiable list. *Note*: This will usually be faster than `(mapv mapper-fn col)` because: - This function allocates a new [[java.util.ArrayList]] in the exact `(.size col)` size, and then fills it with the mapped values. - If the underlying collection is not a Clojure sequence, then `mapv` will first convert it to a Clojure sequence and then map over it. This function will not do that.
cljdoc is a website building & hosting documentation for Clojure/Script libraries
× close