Safe Haskell | Safe-Inferred |
---|
ListUtil
- unfoldr :: (a -> (b, a)) -> (a -> Bool) -> a -> [b]
- chopList :: ([a] -> (b, [a])) -> [a] -> [b]
- breakAt :: Eq a => a -> [a] -> ([a], [a])
- readListLazily :: Read a => String -> [a]
- mapFst :: (t -> t1) -> [(t, t2)] -> [(t1, t2)]
- mapSnd :: (t -> t2) -> [(t1, t)] -> [(t1, t2)]
- assoc :: Eq c => (a -> b) -> b -> [(c, a)] -> c -> b
Documentation
unfoldr :: (a -> (b, a)) -> (a -> Bool) -> a -> [b]
Repeatedly extract (and transform) values until a predicate hold. Return the list of values.
chopList :: ([a] -> (b, [a])) -> [a] -> [b]
readListLazily :: Read a => String -> [a]
Read a list lazily (in contrast with reads which requires to see the ']' before returning the list.
mapFst :: (t -> t1) -> [(t, t2)] -> [(t1, t2)]
mapSnd :: (t -> t2) -> [(t1, t)] -> [(t1, t2)]