collections ListValues - tadashi9e/gmp4pony GitHub Wiki
ListValues[A: A, N: ListNode[A] #read]
Iterate over the values in a List.
class ref ListValues[A: A, N: ListNode[A] #read] is
Iterator[N->A] ref- Iterator[N->A] ref
Build the iterator over values.
reverse of false iterates forward, while
reverse of true iterates in reverse.
new ref create(
head: (N | None val),
reverse: Bool val = false)
: ListValues[A, N] ref^- ListValues[A, N] ref^
Indicates whether there are any values remaining in the iterator.
fun box has_next()
: Bool val- Bool val
Return the next node in the iterator, advancing the iterator by one element.
Order of return is determined by reverse argument during creation.
fun ref next()
: N->A ?- N->A ?