Chain functions together. First argument is the source. Use runN if you want to chain more links than is possible here, at the cost of poorer type hinting.

integers, and then filtering only even numbers.

const ch = Chains.run(
[ `1`, `2`, `3`, `4`, `5`, `6`, `7`, `8`, `9`, `10` ],
Chains.transform(v => Number.parseInt(v)),
Chains.filter(v => v % 2 === 0)
);
const output = await Async.toArray(ch2);
// [ 2, 4, 6, 8, 10 ]
const c1 = Chains.run(
Chains.fromEvent(window, `pointermove`),
Chains.Links.transform(event => ({ x: event.x, y: event.y }))
);

// Eg: print out data as it comes in
Iterables.forEach(c1, coord => {
console.log(coord);
});
// Execution continues immediately