Types
ConstIter
Iterator that returns given value forever.
Parent types
Iter
- Iterator. Parent type for all specific iterator types.
Eachable1
- Eachable which each() calls the callback with one argument
Example
{ Iter } i = ConstIter(10) echo(i.next()) echo(i.next()) # Output: # 10 # 10
Methods
Bool
(i:
ConstIter
)
init
(i:
ConstIter
, val:
Any
)
Constant iterator constructor.
next
(i:
ConstIter
)
Return the constant iterator value
peek
(i:
ConstIter
)
Return the constant iterator value