On Dec 19, 8:27 pm, Sean Devlin <francoisdev...@gmail.com> wrote:
>  :else was chose because it is simply not nil, and therefor always true.

I suspected something along these lines soon after I posted.  I did
some more experimenting and discovered that :foo will work just as
well as :else.  So if I understand correctly, :else is not even
defined in the language anywhere.  Like :foo, it springs into
existence when I first mention it, and it evaluates to true by virtue
of being a keyword.  Cond exploits this behavior for free.

This is in contrast with, e.g., the ns macro, which presumably would
have to explicitly match against keywords such as :use or :require to
implement the proper semantics.

   Mike

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