On Mon, Apr 9, 2012 at 7:54 AM, Jim - FooBar(); <[email protected]>wrote:

> Hello everyone...
>
> Can somebody please provide some insight as to why
> (`+ 1 2) => 2  and
> ('+ 1 2) => 2  ???
>
> Thanks in advance...
>
> Jim
>
> ps. I understand that symbols are functions that look themselves up in
> sequences but here i'm not passing a seq - instead i'm passing 2 args!
> Shouldn't there be an error?
>
> When symbols and keywords are in function position, (as you say) they look
themselves up "in" the second argument. The third argument specifies a
not-found value. Since "1" isn't a collection, it will always result in
not-found.

(:key {} :not-found) => :not-found
('key {} :not-found) => :not-found

-- 
You received this message because you are subscribed to the Google
Groups "Clojure" group.
To post to this group, send email to [email protected]
Note that posts from new members are moderated - please be patient with your 
first post.
To unsubscribe from this group, send email to
[email protected]
For more options, visit this group at
http://groups.google.com/group/clojure?hl=en

Reply via email to