Commit cd5a9709 authored by AlainODea's avatar AlainODea Committed by Ben Gamari
Browse files

Make law for Foldable.length explicit

Test Plan: Documentation only. Not necessary.

Reviewers: austin, hvr, bgamari

Reviewed By: bgamari

Subscribers: rwbarton, thomie

Differential Revision: https://phabricator.haskell.org/D3878
parent 9afaebef
......@@ -99,6 +99,8 @@ infix 4 `elem`, `notElem`
--
-- > fold = foldMap id
--
-- > length = getSum . foldMap (Sum . const 1)
--
-- @sum@, @product@, @maximum@, and @minimum@ should all be essentially
-- equivalent to @foldMap@ forms, such as
--
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment