with.js |
8.2.3.31 Tuple.prototype.with ( index, value )
When the with method is called with two arguments, it returns a new Tuple with the element at index index replaced with value value.
1. Let T be ? thisTupleValue(this value).
2. Let list be a new List containing the elements of T.[[Sequence]].
3. Let length be the length of list list.
4. Let I be ? ToIndex(index).
5. If I ≥ length, throw a RangeError exception.
6. If Type(value) is Object, throw a TypeError exception.
7. Set list[I] to value.
8. Return a new Tuple value whose [[Sequence]] is list.
|
2852 |