README
fall
Gravity =~ 9.81 m/s
A fall is a series of tasks (currently series, but the ability to mix in parallel will be supported soon) that behaves in a fashion similar to the way we process http in node.
A standard fall function looks something like this:
function doSomething(params, output) {
var name = params.name;
setTimeout(function() {
output.write({ age: 35 });
}, 100);
}
In each case the runner is provided with some parameters that have
been created by previous runners, and then produces output using the
output.write
function.
NOTE: Once the write
function is called the descent into the
remaining tasks will continue, so output.write
should be treated
in a similar fashion to a callback unless you want rudimentary streams
behaviour. Although, I would encourage you to look to one of the
existing streaming implementations for that.
Why fall?
At this stage, for two reasons:
- I find myself allergic to writing
then
- I don't yet quite grok
fantasy-promises and
needed something to make linear (and sometimes parallel) control flow
tidier than my current mashing together of
async
function calls.
Fall Reference
fall(runner)
Create a new fall runner that will be ok with be passed to the
fall.into
function.
fall.down(runners)
Fall down the runners...
fall.into(fn)
The fall.into
function is generally designed to be call as a
reducer.