Array enum
Enumerates all elements in ascending index order using an input function with the possibility to interrupt. The elements can be read but cannot be modified using this function.
Arguments
The
array
to enumerate.body
is the callable to be called for each array entry. It has the following stack notation:
( value -- condition )
Each array entry will be provided as input
value
to the callable. When the output condition
is FALSE, enumeration interrupts.
Return values
None
Complexity
O(getSize)
Example
Output:
1,2,3,4,5,6,7,