head package:text
O(1) Returns the first character of a
Text, which must
be non-empty. This is a partial function, consider using
uncons
instead.
O(1) Returns the first character of a
Stream
Char, which must be non-empty. This is a partial function,
consider using
uncons.
Properties
head . stream = head
The memory management overhead. Currently this is tuned for GHC only.
O(1) A variant of
head for non-empty
Text.
unsafeHead omits the check for the empty case, so there is an
obligation on the programmer to provide a proof that the
Text
is non-empty.