On Dec 27, 2009, at 22:33 , Meikel Brandmeyer wrote:

> Checking for nil here is independent on the contents of the lists. The `(map 
> seq lists)` first turns everything in lists into a seq. If a collection is 
> empty it will be turned into nil. This nil is independent of any contained 
> nil of any other collection at that point in the iteration. The second point 
> where nil shows up is fnil. first returns nil when it gets passed nil. We 
> have to modify it to return the default in that case. However the passed nil 
> is again from the seq itself not the  contents. So contained nils are not a 
> problem at all.
> 
> user=> (extend-tupel :x [1 nil 3] [4 5 6 7])
> ((1 4) (nil 5) (3 6) (:x 7))

Ah sorry, you're right, I misinterpreted fnil wrong :) so yes, that is really 
way nicer :) thanks for the hint to fnil too, so it seems not to be in the 
stable clojure yet :( too sad, but copy & paste from your link does :D.


Best regards,
Heinz

-- 
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

Reply via email to