It is serendipitous that I noticed a blog post about a callback combinator while adding a few drops to the Flapjax bucket.
Flapjax is nothing more than a coherent set of callback combinators. The key insight to this set of callback combinators is the “Event” abstraction — a Node in FJ’s implementation. Once callbacks are Nodes, you get two things:
- a handle that allows you to multiply operate on a single (time-varying) data source, and
- a whole host of useful abstractions for manipulating handles: mergeE, calmE, switchE, etc.
The last I saw the implementations of Resume and Continue, they were built using this idea. The more I think about it, the more the FJ-language seems like the wrong approach: the FJ-library is an awesome abstraction, in theory and practice.