I have this function which seems to work fine on limited collections, but not on infinite ones. Is there a way to construct a lazy-seq
in it to get it run with infinite coll's, like: (take 3 (m inc (range)))
=> (1 2 3)
?
(defn m [f c] (reduce #(conj % (f %2)) [] c))