The
lines function breaks a stream of characters into a list of
strings at newline characters. The resulting strings do not contain
newlines.
Beware: if the stream of characters
xs does not
contain newline characters, accessing the tail of
lines xs
will loop.