-
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: low[Issue / PR] could be addressed at any convenient time[Issue / PR] could be addressed at any convenient timeType: 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
Example:
xrange(10).has(7); // true
xrange(2, -3).has(5); // falseconst range = xrange(0, 10, 2);
range.has(6); // true
range.has(7); // false
range.has(8); // trueFunctional implementation is just too unpredictable to have this functionality:
xrange(0, () => Math.random() > 0.5, () => 0).has(0);
// Error: cannot probe items of a non-deterministic range
// (even if `0` is clearly there, such predicate might make the whole range empty)xrange(0, () => true, ([ last ]) => last === 6 ? CONSTANT : last + 1).has(7);
// Error: cannot probe items of a non-deterministic range
// (whether this range has 7 depends on the value of `CONSTANT`)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: low[Issue / PR] could be addressed at any convenient time[Issue / PR] could be addressed at any convenient timeType: 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