| Copyright | © Frank Jung 2020 |
|---|---|
| License | GPL-3 |
| Safe Haskell | Safe-Inferred |
| Language | Haskell2010 |
Trim
Description
An inefficient alternative to dropWhile.
Examples
>>>trim " hello world ""hello world"
>>>dropWhile' isSpace " hello world ""hello word "
>>>dropWhileEnd' isSpace " hello world "" hello word"
Documentation
dropWhile' :: (a -> Bool) -> [a] -> [a] Source #
Drop from beginning of list while predicate is true.
dropWhileEnd' :: (a -> Bool) -> [a] -> [a] Source #
Drop from end of list while predicate is true.