Re: binding and lazy seqs

2013-10-22 Thread Tassilo Horn
Brian Craft writes: Hi Brian, > I just came across this example in "Clojure Programming", chapt 4: > > (def ^:dynamic *max-value* 255) > (defn valid-value? [v] (<= v *max-value*)) > > (binding [*max-value* 500] (map valid-value? [299])) > ;= (false) > > It's not really explained in the text. I'm

binding and lazy seqs

2013-10-22 Thread Brian Craft
I just came across this example in "Clojure Programming", chapt 4: (def ^:dynamic *max-value* 255) (defn valid-value? [v] (<= v *max-value*)) (binding [*max-value* 500] (map valid-value? [299])) ;= (false) It's not really explained in the text. I'm guessing this happens because when the (bindin