|> package:nonempty-containers
Add an element to the right end of a non-empty sequence.
Mnemonic: a triangle with the single element at the pointy end.
Concatenate a non-empty sequence with a potentially
empty sequence (
Seq), to produce a guaranteed non-empty
sequence. Mnemonic: like
><, but a pipe for the
guarunteed non-empty side.
O(1). An abstract constructor for an
NESeq that consists
of a "init"
Seq a and a "last"
a. Similar to
:| for
NonEmpty, but at the end of the list instead of
at the beginning.
Can be used to match on the init and last of an
NESeq, and also
used to
construct an
NESeq by snocing an item to the end
of a
Seq, ensuring that the result is non-empty.