Apparently you misunderstand the term *identity*. The sense is the same as in *identity transform*: it is a function that transforms its argument into itself. It is useful in the context of higher-order functions where it plays the role of a no-op. None of your uses of *identity* make sense to me.
On Wednesday, February 27, 2013 1:20:56 PM UTC+1, Jim foo.bar wrote: > > On 27/02/13 12:12, Chris Ford wrote: > > Can you give an example use case? > > sure... sometimes I do something this: > > (map (if even? (fn [num _] (identity spans)) str) some-seq1 some-seq2) > > but I'd like to write this instead: > > (map (if even? identity str) some-seq1 some-seq2) > > > Personally, I would be a little surprised to find out that identity > > worked like this. After all, why return the first argument, why not > > the last? Or a vector of all the arguments? > > the idea is to we keep the same semantics as we currently have... > > Jim > > > > -- -- 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/groups/opt_out.