head package:base
The first element of a non-empty structure.
>>> head (1 :| [2, 3, 4])
1
Extract the first element of the stream.
Computation
hLookAhead returns the next character from the
handle without removing it from the input buffer, blocking until a
character is available.
This operation may fail with: