-
Notifications
You must be signed in to change notification settings - Fork 0
Open
Labels
Change: minor[Issue / PR] describes a non-breaking change, such as adding a new functionality[Issue / PR] describes a non-breaking change, such as adding a new functionalityDomain: main[Issue / PR] describes change in the functionality, its optimization[Issue / PR] describes change in the functionality, its optimizationPending: blocked[Issue / PR] cannot be addressed until another issue is resolved[Issue / PR] cannot be addressed until another issue is resolvedPriority: medium[Issue / PR] should be addressed without delay[Issue / PR] should be addressed without delayType: improvement[Issue / PR] addresses lack of a functionality or an open possibility of enhancement[Issue / PR] addresses lack of a functionality or an open possibility of enhancementgood first issue[Issue] can be addressed by a first-time contributor[Issue] can be addressed by a first-time contributor
Description
When generating numeric sequences, allow starting them with more than one number:
xrange([1, 1], () => true, ([ last, prelast ]) => last + prelast);
// 1, 1, 2, 3, 5, 8, 13, 21, 34, …
xrange([0, 1, 2, 3, 4], (next) => next < 3, ([ last ]) => last + 1);
// 0, 1, 2
// custom sequence start goes through ("obeys") the predicate
xrange([], (next) => next < 100, ([ last ]) => last + 1);
// (no iterations)
// since sequence start is not defined, the first sequence member is `NaN`, and `NaN < 100` is `false`Metadata
Metadata
Assignees
Labels
Change: minor[Issue / PR] describes a non-breaking change, such as adding a new functionality[Issue / PR] describes a non-breaking change, such as adding a new functionalityDomain: main[Issue / PR] describes change in the functionality, its optimization[Issue / PR] describes change in the functionality, its optimizationPending: blocked[Issue / PR] cannot be addressed until another issue is resolved[Issue / PR] cannot be addressed until another issue is resolvedPriority: medium[Issue / PR] should be addressed without delay[Issue / PR] should be addressed without delayType: improvement[Issue / PR] addresses lack of a functionality or an open possibility of enhancement[Issue / PR] addresses lack of a functionality or an open possibility of enhancementgood first issue[Issue] can be addressed by a first-time contributor[Issue] can be addressed by a first-time contributor