user=> (defn f [[x]] (println "computing x:" (inc x)) (vector (inc x))) #'user/f user=> (->> (iterate f [0]) (take 0)) () user=> (->> (iterate f [0]) (apply concat) (take 0)) computing x: 1 computing x: 2 computing x: 3 () user=> (->> (iterate f [0]) (mapcat identity) (take 0)) computing x: 1 computing x: 2 computing x: 3 ()
Is there a way to rewrite mapcat (or apply concat) so that they don't evaluate the incoming seq unnecessarily? -- You received this message because you are subscribed to the Google Groups "Clojure" group. To post to this group, send email to clojure@googlegroups.com Note that posts from new members are moderated - please be patient with your first post. To unsubscribe from this group, send email to clojure+unsubscr...@googlegroups.com For more options, visit this group at http://groups.google.com/group/clojure?hl=en