Other way round. It behaves like a keyword, looking itself up in a
map:
('x '{x 1 y 2}) yields 2. You see the same behavior with (reduce :and
[5 10]), yielding 10.

On Nov 23, 9:32 pm, Sean Corfield <seancorfi...@gmail.com> wrote:
> @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