Hi, Am 05.10.2009 um 20:37 schrieb Daniel Janus:
(defn baz [s] (map (fn [_] (foo)) s)) user=> (binding [foo bar] (baz [1 2 3])) (42 42 42) ;; while I would expect (44 44 44). Am I missing something here?
You are missing lazyness. The (42 42 42) is printed at the Repl. That realises the seq defined by the map in baz. But then you already left the binding. Add a doall around baz and you will get the desired effect.
Sincerely Meikel
smime.p7s
Description: S/MIME cryptographic signature