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¶
cons¶
Returns a list that has h as a head and t as a tail.
Parameters¶
Returns¶
apply¶
Builds a new list from an Array
Parameters¶
- arr: Array[val->A] ref
Returns¶
from¶
Builds a new list from an iterator
Parameters¶
- iter: Iterator[val->A] ref
Returns¶
eq[optional T: Equatable[T] val]¶
Checks whether two lists are equal.
fun box eq[optional T: Equatable[T] val](
l1: (Cons[T] val | Nil[T] val),
l2: (Cons[T] val | Nil[T] val))
: Bool val ?
Parameters¶
Returns¶
- Bool val ?
ne¶
Parameters¶
- that: Lists[A] val
Returns¶
- Bool val