-
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
In case of numeric implementation, save start, stop, and step as properties of range:
const { start, stop, step } = xrange(10);
start; // 0
stop; // 10
step; // 1const { start, stop, step } = xrange(2, -3);
start; // 2
stop; // -3
step; // -1const { start, stop, step } = xrange(42, 17, 5);
start; // 17
stop; // 42
step; // 5const range = xrange(7, () => true, Math.random);
const { start, stop, step } = range;
start; // undefined
stop; // undefined
step; // undefined
"stop" in range; // true
"step" in range; // trueMetadata
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