-- | Extract everything except the last element of the stream.
init :: NonEmpty a -> [a]
init ~(a :| as) = List.init (a : as)
init :: NonEmpty a -> [a]
init ~(a :| as) = List.init (a : as)
init ~(a :| as) = List.init (a : as)