Module DA.List.Total¶
Functions¶
- head
- : ActionFail m => [a] -> m a
- tail
- : ActionFail m => [a] -> m [a]
- last
- : ActionFail m => [a] -> m a
- init
- : ActionFail m => [a] -> m [a]
- (!!)
- : ActionFail m => [a] -> Int -> m a
- foldl1
- : ActionFail m => (a -> a -> a) -> [a] -> m a
- foldr1
- : ActionFail m => (a -> a -> a) -> [a] -> m a
- foldBalanced1
- : ActionFail m => (a -> a -> a) -> [a] -> m a
- minimumBy
: ActionFail m => (a -> a -> Ordering) -> [a] -> m a
minimumBy f xsreturns the first elementxofxsfor whichf x yis eitherLTorEQfor all otheryinxs. The result is wrapped in a monadic context, with a failure ifxsis empty.
- maximumBy
: ActionFail m => (a -> a -> Ordering) -> [a] -> m a
maximumBy f xsreturns the first elementxofxsfor whichf x yis eitherGTorEQfor all otheryinxs. The result is wrapped in a monadic context, with a failure ifxsis empty.
- minimumOn
: (ActionFail m, Ord k) => (a -> k) -> [a] -> m a
minimumOn f xsreturns the first elementxofxsfor whichf xis smaller than or equal to any otherf yforyinxs. The result is wrapped in a monadic context, with a failure ifxsis empty.
- maximumOn
: (ActionFail m, Ord k) => (a -> k) -> [a] -> m a
maximumOn f xsreturns the first elementxofxsfor whichf xis greater than or equal to any otherf yforyinxs. The result is wrapped in a monadic context, with a failure ifxsis empty.