Skip to content

Commit

Permalink
add Tuple.prototype.{ findLast, findLastIndex } (#311)
Browse files Browse the repository at this point in the history
  • Loading branch information
zloirock authored Jul 7, 2022
1 parent 935d7b2 commit 69423a7
Showing 1 changed file with 10 additions and 0 deletions.
10 changes: 10 additions & 0 deletions spec/immutable-data-structures.html
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,16 @@ <h1>Tuple.prototype.findIndex ( _predicate_ [ , _thisArg_ ] )</h1>
<p>`Tuple.prototype.findIndex` is a distinct function that implements the same algorithm as `Array.prototype.findIndex` as defined in <emu-xref href="#sec-array.prototype.findindex"></emu-xref> except that ? thisTupleValue(*this* value) is used instead of directly accessing the *this* value. The implementation of the algorithm may be optimized with the knowledge that the *this* value is an object that has a fixed length and whose <emu-xref href="#integer-index">integer-indexed</emu-xref> properties are not sparse, do not change, and their access is not observable. However, such optimization must not introduce any observable changes in the specified behaviour of the algorithm.</p>
<p>This function is not generic, since thisTupleValue(*this* value) can return an abrupt completion: in that case, that exception is thrown instead of evaluating the algorithm.</p>
</emu-clause>
<emu-clause id="sec-tuple.prototype.findlast">
<h1>Tuple.prototype.findLast ( _predicate_ [ , _thisArg_ ] )</h1>
<p>`Tuple.prototype.findLast` is a distinct function that implements the same algorithm as `Array.prototype.findLast` as defined in <emu-xref href="#sec-array.prototype.findlast"></emu-xref> except that ? thisTupleValue(*this* value) is used instead of directly accessing the *this* value. The implementation of the algorithm may be optimized with the knowledge that the *this* value is an object that has a fixed length and whose <emu-xref href="#integer-index">integer-indexed</emu-xref> properties are not sparse, do not change, and their access is not observable. However, such optimization must not introduce any observable changes in the specified behaviour of the algorithm.</p>
<p>This function is not generic, since thisTupleValue(*this* value) can return an abrupt completion: in that case, that exception is thrown instead of evaluating the algorithm.</p>
</emu-clause>
<emu-clause id="sec-tuple.prototype.findlastindex">
<h1>Tuple.prototype.findLastIndex ( _predicate_ [ , _thisArg_ ] )</h1>
<p>`Tuple.prototype.findLastIndex` is a distinct function that implements the same algorithm as `Array.prototype.findLastIndex` as defined in <emu-xref href="#sec-array.prototype.findlastindex"></emu-xref> except that ? thisTupleValue(*this* value) is used instead of directly accessing the *this* value. The implementation of the algorithm may be optimized with the knowledge that the *this* value is an object that has a fixed length and whose <emu-xref href="#integer-index">integer-indexed</emu-xref> properties are not sparse, do not change, and their access is not observable. However, such optimization must not introduce any observable changes in the specified behaviour of the algorithm.</p>
<p>This function is not generic, since thisTupleValue(*this* value) can return an abrupt completion: in that case, that exception is thrown instead of evaluating the algorithm.</p>
</emu-clause>
<emu-clause id="sec-tuple.prototype.flat">
<h1>Tuple.prototype.flat ( [ _depth_ ] )</h1>
<p>When the `flat` method is called with zero or one arguments, the following steps are taken:</p>
Expand Down

0 comments on commit 69423a7

Please sign in to comment.