datashaman

coffeescript tag

Cumulative Filter Object

I've created a cumulative object in coffeescript, useful for creating filters.

It's closest to a Reader / Environment monad.

Every time you call it with arguments, it merges them into a running context, which it uses to create the next filter which is returned. You can create graphs of filters, deriving from a common point.