Skip to content

Foldable laws? #49

@toraritte

Description

@toraritte

From Foldable documentation:

People are working on Foldable properties. This is one of the exceptions to there needing to conform to properties.

PureScript's Foldable doesn't mention properties, but Haskell's does:

foldr f z t = appEndo (foldMap (Endo . f) t ) z
foldl f z t = appEndo (getDual (foldMap (Dual . Endo . flip f) t)) z
fold = foldMap id
length = getSum . foldMap (Sum . const  1)

Documenting other useful sources found:

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions