If type is number-range and stepis not a Number, throw a TypeError exception.
Else if type is bigint-range and stepis not a BigInt, throw a TypeError exception.
If step is +∞𝔽 or -∞𝔽, throw a RangeError exception.
If step is zero and start is not end, throw a RangeError exception.
Let closure be a new Abstract Closure with no parameters that captures start, end, step, inclusiveEnd, zero, one and performs the following steps when called:
If type is number-range and stepis not a Number, throw a TypeError exception.
Else if type is bigint-range and stepis not a BigInt, throw a TypeError exception.
If step is +∞𝔽 or -∞𝔽, throw a RangeError exception.
If SameValueZero(step, zero) is true and start is not end, throw a RangeError exception.
Let closure be a new Abstract Closure with no parameters that captures start, end, step, inclusiveEnd, zero, one and performs the following steps when called: