adds map-fast-vec helper

This commit is contained in:
Ben Mabey 2011-12-13 20:10:44 -07:00
parent fa2d39ffe5
commit e9b63b877f

View file

@ -29,6 +29,12 @@
(.addElement fv item))
fv))
(defn map-fast-vec [^weka.core.FastVector fast-vector f]
(->> (.elements fast-vector)
enumeration-seq
(map f)
into-fast-vector))
(defn update-in-when
"Similar to update-in, but returns m unmodified if any levels do
not exist"