Sandbox/Elm Programming Language/Functions as Events

Re-imagine functions and events as equivalent. Invokation of a function is an event.

A block of code (a complex expression) can be associated with the function.

The event also has a leading-edge and trailing-edge. The leading-edge is before the associated block of code is called, and callbacks can be associated with that edge: this is referred to the prologue. Likewise there is an epilogue for after the function is invoked.


 * lock threads on events: waiting for events
 * per-object or per-class?
 * imp pattern