Generates iterable from function application.
This is part of package extra-iterable.
This is browserified, minified version of @extra-iterable/from-apply.
It is exported as global variable iterable_fromApply.
CDN: unpkg, jsDelivr.
iterable.fromApply([fm], v, [n]);
// fm: map function (v, i)
// v: start value
// n: number of values (-1 => Inf)
const iterable = require("extra-iterable");
[...iterable.fromApply(v => v+2, 2, 4)];
// [ 2, 4, 6, 8 ]
[...iterable.fromApply(v => v*2, 2, 4)];
// [ 2, 4, 8, 16 ]