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 element- xof- xsfor which- f x yis either- LTor- EQfor all other- yin- xs. The result is wrapped in a monadic context, with a failure if- xsis empty.
- maximumBy
- : ActionFail m => (a -> a -> Ordering) -> [a] -> m a - maximumBy f xsreturns the first element- xof- xsfor which- f x yis either- GTor- EQfor all other- yin- xs. The result is wrapped in a monadic context, with a failure if- xsis empty.
- minimumOn
- : (ActionFail m, Ord k) => (a -> k) -> [a] -> m a - minimumOn f xsreturns the first element- xof- xsfor which- f xis smaller than or equal to any other- f yfor- yin- xs. The result is wrapped in a monadic context, with a failure if- xsis empty.
- maximumOn
- : (ActionFail m, Ord k) => (a -> k) -> [a] -> m a - maximumOn f xsreturns the first element- xof- xsfor which- f xis greater than or equal to any other- f yfor- yin- xs. The result is wrapped in a monadic context, with a failure if- xsis empty.