literal phrase ⇒ token, literal phrase ⇒ token, expression phrase ⇒ tuple, block phrase ⇒ []→⊤
Source: /avail/Avail/Foundation/Tuples
Categories: Loops, Collections, Tuples
Iteratively apply action to each consecutive element and index of aTuple, rejecting those elements for which action answers true into a new tuple (and preserving ordering). Answer the new tuple.
Position | Name | Type | Description | |
---|---|---|---|---|
Parameters | ||||
1 | elementPhrase | literal phrase ⇒ token | A literal phrase holding a synthetic literal token whose value is the name of the loop variable. The generated loop variable is given the strongest possible type based on the type union of the leading types and default type of aTuple. | |
2 | indexPhrase | literal phrase ⇒ token | A literal phrase holding a synthetic literal token whose value is the name of the loop index variable. The generated loop variable is given the strongest possible type based on the cardinality of aTuple. | |
3 | aTuple | expression phrase ⇒ tuple | An expression phrase that yields the tuple to iterate over | |
4 | action | block phrase ⇒ []→⊤ | A zero-argument block phrase that represents the body of the loop. | |
Returns | send phrase ⇒ ⊤ |