head package:base

Warning: This is a partial function, it throws an error on empty lists. Use pattern matching, uncons or listToMaybe instead. Consider refactoring to use Data.List.NonEmpty.
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: