- splitBy :: Eq a => a -> [a] -> [[a]]
- trim :: (a -> Bool) -> [a] -> [a]
- convertFirst :: (a -> a) -> [a] -> [a]
Documentation
splitBy :: Eq a => a -> [a] -> [[a]]Source
Splits a list x
of a
into a list of lists of a
at every c
.
"splitBy "foo,bar" "',' == ["foo","bar"] '
trim :: (a -> Bool) -> [a] -> [a]Source
Trims every element satisfying c
from the beginning or end of the list.
trim (==' ') " foo " == "foo"
convertFirst :: (a -> a) -> [a] -> [a]Source
Convert first element in list
convertFirst (toUpper) "fO0" == "FO0"