| Copyright | (c) roki 2019 |
|---|---|
| License | MIT |
| Maintainer | falgon53@yahoo.co.jp |
| Stability | experimental |
| Portability | POSIX |
| Safe Haskell | Safe |
| Language | Haskell2010 |
Htcc.Utils.List
Contents
Description
List utilities
Extra functions for lists
takeWhileLen :: (a -> Bool) -> [a] -> (Int, [a]) Source #
takeWhileLen, applied to a predicate f and a list xs, returns the
longest prefix (possibly empty) of xs of elements that satisfy f and
the length of the list taken. The time complexity of this function is
equivalent to takeWhile.
splitAtLen :: Int -> [a] -> (Int, [a], [a]) Source #
splitAtLen, simmilar to splitAt but also returns the length of the splited list.