Lists[A: A]¶
A primitive containing helper functions for constructing and testing Lists.
Constructors¶
create¶
Returns¶
- Lists[A] val^
Public Functions¶
empty¶
Returns an empty list.
Returns¶
- List[A]
cons¶
Returns a list that has h as a head and t as a tail.
Parameters¶
- h: val->A
- t: List[A]
Returns¶
- List[A]
apply¶
Builds a new list from an Array
Parameters¶
- arr: Array[val->A] ref
Returns¶
- List[A]
from¶
Builds a new list from an iterator
Parameters¶
- iter: Iterator[val->A] ref
Returns¶
- List[A]
eq[optional T: Equatable[T] val]¶
Checks whether two lists are equal.
Parameters¶
Returns¶
- Bool val ?
ne¶
Parameters¶
- that: Lists[A] val
Returns¶
- Bool val