> > This is exactly one of the reasons a bunch of folk ( aka, purests maybe ) > don't like that map/filter etc. in Clojure convert the input collection > into seqs, unlike Haskell or others where the those monad laws keep you in > check that map/filter return the *same* container - so mapping a set > would yield another set - also with no guaranteed order, and also with > uniqueness applied - so technically a map over a set may yield a collection > of an equal or smaller size, but never greater. > > This seems to fuel a lot of debate when entered into - so I guess I'm > asking for trouble in replies here :) > > Mark >
I suppose Clojure 1.7 transducers can address this thought in a way. e.g. (into #{} (map <some-fn>) <some-set>) Doesn't expose any intermediate "seq state" of the collection. -- 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 --- You received this message because you are subscribed to the Google Groups "Clojure" group. To unsubscribe from this group and stop receiving emails from it, send an email to clojure+unsubscr...@googlegroups.com. For more options, visit https://groups.google.com/d/optout.