literal phrase ⇒ token, expression phrase ⇒ reader, block phrase ⇒ []→⊤
Source: /avail/Avail/Data Abstractions/Iterators/Iterators
Categories: Loops, Readers, Data Abstractions
Construct and answer a reader that applies action to the consecutive elements of aReader. The result is lazy, so aReader may be infinite.
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 of aReader 's element type. | |
2 | aReader | expression phrase ⇒ reader | An expression phrase that yields the reader to iterate over | |
3 | action | block phrase ⇒ []→⊤ | A zero-argument block phrase that represents the body of the loop. | |
Returns | send phrase ⇒ ⊤ |
literal phrase ⇒ token, expression phrase ⇒ reader, block phrase ⇒ []→⊤
Source: /avail/Avail/Data Abstractions/Streams/Streams
Categories: Loops, Streams, Data Abstractions
Construct and answer a stream that applies `theTransformer` to the consecutive elements of `aStream`. The result is lazy, so `aStream` may be infinite.
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 of aStream 's element type. | |
2 | aStream | expression phrase ⇒ reader | An expression phrase that yields the reader to iterate over | |
3 | action | block phrase ⇒ []→⊤ | A zero-argument block phrase that represents the body of the loop. | |
Returns | send phrase ⇒ ⊤ |
literal phrase ⇒ token, expression phrase ⇒ any, block phrase ⇒ []→⊤
Source: /avail/Avail/Foundation/Tuples
Categories: Control Structures, Loops, Collections, Tuples
Iteratively apply transformer to each consecutive element of aTuple, collecting the results into a new tuple (and preserving ordering of the transformed elements). Answer this 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 | aTuple | expression phrase ⇒ any | An expression phrase that yields the tuple to iterate over | |
3 | action | block phrase ⇒ []→⊤ | A zero-argument block phrase that represents the body of the loop. | |
Returns | send phrase ⇒ ⊤ |
literal phrase ⇒ token, expression phrase ⇒ set, block phrase ⇒ []→⊤
Source: /avail/Avail/Foundation/Sets
Categories: Control Structures, Loops, Collections, Sets
Iteratively apply transformer to each element of aSet, collecting the results into a new tuple. The set is traversed in no particular order. Answer the resultant set.
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 aSet. | |
2 | aSet | expression phrase ⇒ set | An expression phrase that yields the set to iterate over | |
3 | action | block phrase ⇒ []→⊤ | A zero-argument block phrase that represents the body of the loop. | |
Returns | send phrase ⇒ ⊤ |