ListValues[A: A, N: ListNode[A] #read]¶
Iterate over the values in a List
.
Implements¶
- Iterator[N->A] ref
Constructors¶
create¶
Build the iterator over values.
reverse
of false
iterates forward, while
reverse
of true
iterates in reverse.
Parameters¶
Returns¶
- ListValues[A, N] ref^
Public Functions¶
has_next¶
Indicates whether there are any values remaining in the iterator.
Returns¶
- Bool val
next¶
Return the next node in the iterator, advancing the iterator by one element.
Order of return is determined by reverse
argument during creation.
Returns¶
- N->A ?