Compat.Seq
If xs
is empty, then uncons xs
is None
.
If xs
is nonempty, then uncons xs
is Some (x, ys)
where x
is the head of the sequence and ys
its tail.
is_empty xs
determines whether the sequence xs
is empty.
It is recommended that the sequence xs
be persistent. Indeed, is_empty xs
demands the head of the sequence xs
, so, if xs
is ephemeral, it may be the case that xs
cannot be used any more after this call has taken place.
append xs ys
is the concatenation of the sequences xs
and ys
.
Its elements are the elements of xs
, followed by the elements of ys
.