std.foldable
Implementation of the Foldable
type
Types
#[implicit]
type Foldable f = {
foldr : forall a b . (a -> b -> b) -> b -> f a -> b,
foldl : forall a b . (b -> a -> b) -> b -> f a -> b
}
Operations over a data structure that can be folded which means that a functions gets called on
each element to reduce the structure to a single value (Array
, List
and Map
are all Foldable
)