Aw: Continuations or monads or something

2011-06-30 Thread Meikel Brandmeyer
Hi, BTW, did you look at the monad package in contrib? (The new one is algo.monad, I think.) Maybe you could use the continuation monad (which this basically is) for the infrastructure. Sincerely Meikel -- You received this message because you are subscribed to the Google Groups "Clojure" gro

Aw: Continuations or monads or something

2011-06-30 Thread Meikel Brandmeyer
Hi again, await-event is not thread-safe. (defn await-event [target event] (let [evt (promise) remove-fn (promise) handler (fn [e] (@remove-fn) (deliver evt e))] (deliver remove-fn (listen target event handler)) @evt)) remove-fn should also be a promise. Other