On Wed, Jan 7, 2009 at 8:26 AM, janus <emekami...@gmail.com> wrote:
>
> It can't figure out why this is not working or was I sleeping while
> trying it out.
>
> (apply #(println %) [2 3])

The #(println %) procedure takes only one argument (because you only
have that one % in there) and you are applying it to two, namely 2 and
3.

You are effectively trying to do (#(println %) 1 2).

Maybe try this instead:

(apply println [2 3])

>
> And, why is it that I can't do this?
>
> Instead of (let [{coin :coin :as snake}{...................}][coin
> snake])
> I tried this (let [{:coin coin :as snake}{...................}][coin
> snake]) and got failure. Why is it so?(just changed the position of
> the key :coin)

Because the binding-form goes before the key when you use map-binding
forms, and a keyword (:coin) cannot be used as a binding-form.

>
> Emeka
> >
>



-- 
Venlig hilsen / Kind regards,
Christian Vest Hansen.

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