I created CLJ-1103 and attached a patch that makes this change, as well as related changes to conj! assoc assoc! and dissoc! (dissoc, disj and disj! already handled these cases).
http://dev.clojure.org/jira/browse/CLJ-1103 Andy On Nov 4, 2012, at 5:52 AM, Jonathan Fischer Friberg wrote: > It would be nice if clojure.core/conj had a unary implementation > > ([coll] coll) > > I support this. Reasons: > > 1. It makes sense, adding nothing to something should give back the something. > 2. It's consistent with disj as mentioned. > 3. Supporting edge cases like this can make some algorithms much more > succinct. > (as in CGAT's code - no need to check for extra cases) > Compare: (conj nil 3) => (3) > > Jonathan > > -- > 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 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