No, I think it's worthwhile to think about a more fundamental
semantic. What does nil mean? Although it's often misused, nil is
provided so that a function can simply respond, "I can't answer your
question". That's the perfect response from (last c) when c is empty,
whether c normally contains nil elements or not.

Now, if you insist on using the same tool when c is not empty but
contains nil elements, well, that's your problem! It's a higher-level
problem, one that may require rethinking your data representation. Or
you could use empty? as you showed. But let's not claim this is an
exceptional condition when the current semantic of nil is already a
perfect fit.

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