@lloyda2 posted on Twitter: (reduce 'and '(false true)) => true ...Huh?

I must admit, it looked odd to me... but I realized (after some REPL
experimentation) this seems to be equivalent to ('some-symbol
:some-key :some-default) and that attempts (and fails) to somehow
lookup :some-key in 'some-symbol and thus returns the default
supplied, :some-default - or, in the OP's case ('and false true) which
yields true.

Can someone provide a bit more insight into why clojure.lang.Symbol
behaves like a collection and what, if any elements does it have? It
just seems like weird behavior and I can't imagine what use case this
addresses...
-- 
Sean A Corfield -- (904) 302-SEAN
An Architect's View -- http://corfield.org/
World Singles, LLC. -- http://worldsingles.com/

"Perfection is the enemy of the good."
-- Gustave Flaubert, French realist novelist (1821-1880)

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