Safe Haskell | Safe-Inferred |
---|---|
Language | GHC2021 |
Synopsis
- magma :: (a -> a -> a) -> Fold a (Maybe a)
- semigroup :: Semigroup a => Fold a (Maybe a)
- monoid :: Monoid a => Fold a a
- first :: Fold a (Maybe a)
- last :: Fold a (Maybe a)
- maximum :: Ord a => Fold a (Maybe a)
- minimum :: Ord a => Fold a (Maybe a)
- maximumBy :: (a -> a -> Ordering) -> Fold a (Maybe a)
- minimumBy :: (a -> a -> Ordering) -> Fold a (Maybe a)
- null :: Fold a Bool
- length :: Fold a Natural
- and :: Fold Bool Bool
- or :: Fold Bool Bool
- all :: (a -> Bool) -> Fold a Bool
- any :: (a -> Bool) -> Fold a Bool
- sum :: Num a => Fold a a
- product :: Num a => Fold a a
- mean :: Fractional a => Fold a a
- variance :: Fractional a => Fold a a
- standardDeviation :: Floating a => Fold a a
- element :: Eq a => a -> Fold a Bool
- notElement :: Eq a => a -> Fold a Bool
- find :: (a -> Bool) -> Fold a (Maybe a)
- lookup :: Eq a => a -> Fold (a, b) (Maybe b)
- index :: Natural -> Fold a (Maybe a)
- findIndex :: (a -> Bool) -> Fold a (Maybe Natural)
- elementIndex :: Eq a => a -> Fold a (Maybe Natural)
- list :: Fold a [a]
- reverseList :: Fold a [a]
General
magma :: (a -> a -> a) -> Fold a (Maybe a) Source #
Start with the first input, append each new input on the right with the given function
Endpoints
Extrema
maximumBy :: (a -> a -> Ordering) -> Fold a (Maybe a) Source #
The greatest input with respect to the given comparison function
minimumBy :: (a -> a -> Ordering) -> Fold a (Maybe a) Source #
The least input with respect to the given comparison function
Length
Boolean
Numeric
mean :: Fractional a => Fold a a Source #
Numerically stable arithmetic mean of the inputs
variance :: Fractional a => Fold a a Source #
Numerically stable (population) variance over the inputs
standardDeviation :: Floating a => Fold a a Source #
Numerically stable (population) standard deviation over the inputs
Search
find :: (a -> Bool) -> Fold a (Maybe a) Source #
The first input that satisfies the predicate, if any
lookup :: Eq a => a -> Fold (a, b) (Maybe b) Source #
The b
from the first tuple where a
equals the given value, if any
Index
index :: Natural -> Fold a (Maybe a) Source #
The nth input, where n=0 is the first input, if the index is in bounds
findIndex :: (a -> Bool) -> Fold a (Maybe Natural) Source #
The index of the first input that satisfies the predicate, if any
elementIndex :: Eq a => a -> Fold a (Maybe Natural) Source #
The index of the first input that matches the given value, if any
List
reverseList :: Fold a [a] Source #
All the inputs in reverse order