JYU-Utils-0.1.1.2: Some utility functions for JYU projects

Utils.List

Synopsis

Documentation

clusterBy :: Ord b => (a -> b) -> [a] -> [[a]]Source

Group list into indevidual pairs: [1,2,3,4] => [(1,2),(3,4)]. Works only with even number of elements

Undo pairs function

Group list into pairs: [1,2,3] => [(1,2),(2,3)]. Works with non null lists

Undo pairs1 function

schwartzianTransform :: (Ord a, Ord b) => (a -> b) -> [a] -> [a]Source

splitBy :: (a -> Bool) -> [a] -> [[a]]Source

applyMapM :: Monad m => a -> [a -> m b] -> m [b]Source

changesM :: Monad m => [a -> m b] -> a -> m [b]Source