diff --git a/src/main/clojure/aerospike_clj/collections.clj b/src/main/clojure/aerospike_clj/collections.clj index 5ef77d0..fbdf04b 100644 --- a/src/main/clojure/aerospike_clj/collections.clj +++ b/src/main/clojure/aerospike_clj/collections.clj @@ -3,10 +3,10 @@ (java.util.function Consumer))) (defn ->list - "Returns a new [java.util.List] containing the result of applying `mapper-fn` to each item in `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.List] in the exactly `(.size col)` size and then + - 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."