On Nov 24, 2011, at 12:32 AM, Sean Corfield 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) 

I saw the tweet too - and after experimenting in REPL - replied to it that in 
this case 'and is just a symbol and 'foo works just the same.


> Can someone provide a bit more insight into why clojure.lang.Symbol
> behaves like a collection and what, if any elements does it have?

Also interested in learning more, but I concluded (erroneously?) that it is 
false that is being "indexed" into: (:a false) returns nil as does ('and false) 
and (get false 2); I assumed it was so that it would fail gracefully if 
encountered where a collection was expected.


bill

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