-- | Extract the last element of the stream.
last :: NonEmpty a -> a
last ~(a :| as) = List.last (a : as)
last :: NonEmpty a -> a
last ~(a :| as) = List.last (a : as)
last ~(a :| as) = List.last (a : as)