2 ms·
I know scheme (r5rs), but I can't figure out how this code works. Are there any good introduction text for this lisp?
by morphir 17y ago
I know scheme (r5rs), but I can't figure out how this code works. Are there any good introduction text for this lisp?
- dkersten 17y agoStuart Halloway's Programming clojure book is exceptionally good[1] The basic idea is to map (using Clojures parallel pmap) over each component and call the event handler for the event being processed, if the component has one. The code is slightly complicated by wanting a non-global event queue and async event sending, so I use a dynamic binding to rebind the event function so that it can access the local event queue (which is the only mutable variable I use). I'm sure theres better/simpler/more idiomatic ways of achieving this, but whatever. [1] http://pragprog.com/titles/shcloj http://pragprog.com/titles/shcloj