thinking about it a bit more, it would certainly make sense to return a seq with all the identities. Then I can just ask for the first...hmm interesting :)

Jim


On 27/02/13 12:20, 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.


Reply via email to