Muse reader: simplify lchop
This commit is contained in:
parent
37c6f6adfe
commit
fedf1f213f
1 changed files with 2 additions and 3 deletions
|
@ -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
|
||||
|
|
Loading…
Add table
Reference in a new issue