On Fri, Feb 27, 2009 at 4:34 AM, Michael Wood <esiot...@gmail.com> wrote: > > On Fri, Feb 27, 2009 at 11:08 AM, timc <timgcl...@gmail.com> wrote: >> >> On the page describing Vars, I cannot get the meaning of this sentence >> (a typo has made it incomprehensible I think): >> >> "Bindings created with binding can be assigned to, which provides a >> means for nested contexts to communicate with code before it the call >> stack." > > I think there's just an "in" missing. i.e. I think it should be: > > Bindings created with binding can be assigned to, which provides a > means for nested contexts to communicate with code before it _in_ the call > stack. > > It could be a little clearer as follows: > > Bindings created with _the binding macro_ can be assigned to, which[...]
The word "before" is what seems out of place to me. The typically use of binding that I've seen is for binding a different value to a Var for the duration of the binding scope which includes calls that occur *after* the binding keyword, but in its scope. For example, println normally writes to stdout, but you can changes that for a limited scope with binding. (println "This goes to stdout.") (binding [*out* (java.io.FileWriter. "my.log")] (println "This goes to the log file.") (foo "bar") ; If the function foo uses println, that output will also go to the log file. (flush)) (println "Now we're back to writing to stdout.") -- R. Mark Volkmann Object Computing, Inc. --~--~---------~--~----~------------~-------~--~----~ 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 -~----------~----~----~----~------~----~------~--~---