bff-mono-0.2.3: "Bidirectionalization for Free" for Monomorphic Transformations

Safe HaskellNone
LanguageHaskell98

Data.BffMono.Utility

Description

The module provides counterparts of ..By functions in Data.List for monadic observations.

Documentation

ifM :: Monad m => m Bool -> m a -> m a -> m a Source

nubByM :: Monad m => (a -> a -> m Bool) -> [a] -> m [a] Source

deleteByM :: Monad m => (a -> a -> m Bool) -> a -> [a] -> m [a] Source

deleteFirstByM :: Monad m => (a -> a -> m Bool) -> a -> [a] -> m [a] Source

unionByM :: Monad m => (a -> a -> m Bool) -> [a] -> [a] -> m [a] Source

intersectByM :: Monad m => (a -> a -> m Bool) -> [a] -> [a] -> m [a] Source

elemByM :: Monad m => (a -> a -> m Bool) -> a -> [a] -> m Bool Source

groupByM :: Monad m => (a -> a -> m Bool) -> [a] -> m [[a]] Source

sortByM :: Monad m => (a -> a -> m Ordering) -> [a] -> m [a] Source

insertByM :: Monad m => (a -> a -> m Ordering) -> a -> [a] -> m [a] Source

maximumByM :: Monad m => (a -> a -> m Ordering) -> [a] -> m a Source

minimumByM :: Monad m => (a -> a -> m Ordering) -> [a] -> m a Source