haskpy.typeclasses.foldable

Struture that can be squashed

Foldable

Foldable typeclass

fold_map(monoid, f, xs)

(Foldable t, Monoid m) => Monoid -> (a -> m) -> t a -> m

foldl(combine, initial, xs)

Foldable t => (b -> a -> b) -> b -> t a -> b

foldr(combine, initial, xs)

Foldable t => (a -> b -> b) -> b -> t a -> b

foldr_lazy(combine, initial, xs)

Foldable t => (a -> (() -> b) -> (() -> b)) -> b -> t a -> b

fold(monoid, xs)

(Foldable t, Monoid m) => Monoid -> t a -> m

length(xs)

Foldable t => t a -> int

sum(xs)

(Foldable t, Num a) => t a -> a

null(xs)

Foldable t => t a -> Bool

elem(e, xs)

(Foldable t, Eq a) => a -> t a -> Bool