On Tue, Sep 30, 2008 at 7:24 PM, dherring <[EMAIL PROTECTED]> wrote: > > Related question: Is there any way to "return" side-channel data past > intermediate frames which don't understand the protocol (i.e. no > throwing an exception and prematurely terminating them)?
I don't know if this is sufficient for what you had in mind, but it's pretty close: (def side-x) (def side-y) (defn knows-protocol [x] (set! side-x x) (+ x 5)) (defn oblivious [x] (knows-protocol (+ 2 x))) (binding [side-x nil side-y nil] (let [retval (oblivious 1)] ; now retval=8, side-x=3, side-y=nil (prn :retval retval) (prn :side-x side-x) (prn :side-y side-y))) --Chouser --~--~---------~--~----~------------~-------~--~----~ 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 [EMAIL PROTECTED] For more options, visit this group at http://groups.google.com/group/clojure?hl=en -~----------~----~----~----~------~----~------~--~---