Re: Do not understand why loop takes 3 arguments who are all the same

2014-05-03 Thread Bob Hutchison
On May 3, 2014, at 6:42 AM, Roelof Wobben wrote: > > (fn [default initial-keys] > (loop [remaining-keys initial-keys > result-map {}] > (if (empty? remaining-keys) >result-map >(let [key (first remaining-keys) > remaining-keys' (rest

Re: Do not understand why loop takes 3 arguments who are all the same

2014-05-03 Thread Roelof Wobben
> > > (fn [default initial-keys] > (loop [remaining-keys initial-keys > result-map {}] > (if (empty? remaining-keys) >result-map >(let [key (first remaining-keys) > remaining-keys' (rest remaining-keys) > result-map' (as

Re: Do not understand why loop takes 3 arguments who are all the same

2014-05-03 Thread Bob Hutchison
Hi Roelof, On May 3, 2014, at 3:09 AM, Roelof Wobben wrote: > Hello, > > Im now at the last exercise of the beginners exercise of 4clojure. nice! > > I figured out that this solution works. > > (fn [default lijst1] > (loop [lijst lijst1 d {}] > (if (empty? lijst) >d >

Do not understand why loop takes 3 arguments who are all the same

2014-05-03 Thread Roelof Wobben
Hello, Im now at the last exercise of the beginners exercise of 4clojure. I figured out that this solution works. (fn [default lijst1] (loop [lijst lijst1 d {}] (if (empty? lijst) d (recur (rest lijst) (assoc d (first lijst) default) But as I see it lijst lijst 1 and d