Muse reader: simplify lchop

This commit is contained in:
Alexander Krotov 2018-09-21 02:57:06 +03:00
parent 37c6f6adfe
commit fedf1f213f

View file

@ -145,9 +145,8 @@ commonPrefix (x:xs) (y:ys)
-- | Trim up to one newline from the beginning of the string.
lchop :: String -> String
lchop s = case s of
'\n':ss -> ss
_ -> s
lchop ('\n':xs) = xs
lchop s = s
-- | Trim up to one newline from the end of the string.
rchop :: String -> String