Re: bindings & lazy-seq

2011-03-26 Thread Mark Nutter
I'll take a stab at this and then someone can tell me if I'm understanding it myself. > (lazy-seq > (binding [*in* in#] ><-- some code -->)) This is inside the definition, so it executes whenever you actually USE the definition--i.e. it binds *in* to in# at the time the lazy seq is used, whi

Re: bindings & lazy-seq

2011-03-25 Thread Meikel Brandmeyer
Hi, This might help: http://kotka.de/blog/2009/11/Taming_the_Bound_Seq.html Sincerely Meikel -- 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 Note that posts from new members are moderated

bindings & lazy-seq

2011-03-25 Thread Carlos-K
Hi, Why when you create a lazy sequence, you need to do the bindings inside the definition?, e.g., (lazy-seq (binding [*in* in#] <-- some code -->)) As opposed to make the bindings first and call the lazy-seq later, e.g., (binding [*in* in#] (lazy-seq <-- some code -->)) Thanks -