In this line:

(map (if even? (fn [num _] (identity spans)) str)  some-seq1 some-seq2) 

you appear to involve *identity* in a way that makes no sense since 
(identity spans) is just spans. You also don't involve the *num* argument 
at all; but maybe you meant

(map (if even? (fn [num _] num) str)  some-seq1 some-seq2) 

Then I'd see what you mean, even though I wouldn't call that function *
identity* because it clearly does something more specialized than a no-op: 
it *ignores* the element coming from some-seq2. It would be quite confusing 
to see a function named *identity* do that.


On Wednesday, February 27, 2013 1:39:54 PM UTC+1, Jim foo.bar wrote:
>
> On 27/02/13 12:35, Marko Topolnik wrote: 
> > 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 
>
> that is exactly what I'm trying to do..a no-op based on some 
> condition...Though, I can see why  it would be confusing to just return 
> the first arg...what exactly makes no sense? 
>
> 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