Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

I know scheme (r5rs), but I can't figure out how this code works. Are there any good introduction text for this lisp?


Stuart 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




Consider applying for YC's Winter 2027 batch! Applications are open till November 2.

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: