Iterate over the values in a list.
class ref ListValues[A: A, N: ListNode[A] #read] is Iterator[N->A] ref
Keep the next list node to be examined.
new ref create( head: (N | None val), reverse: Bool val = false) : ListValues[A, N] ref^
If we have a list node, we have more values.
fun box has_next() : Bool val
Get the value of the list node and replace it with the next one.
fun ref next() : N->A ?
© 2016-2018, The Pony Developers
© 2014-2015, Causality Ltd.
Licensed under the BSD 2-Clause License.
https://stdlib.ponylang.io/collections-ListValues