Skip to content

Commit

Permalink
Clarify that a Traversal is a Fold iff Simple
Browse files Browse the repository at this point in the history
Fixes #600.
  • Loading branch information
treeowl committed Oct 1, 2015
1 parent 32716c2 commit 22e5a4f
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions src/Control/Lens/Traversal.hs
Original file line number Diff line number Diff line change
Expand Up @@ -34,12 +34,12 @@
-- type 'Traversal' s t a b = forall f. 'Applicative' f => (a -> f b) -> s -> f t
-- @
--
-- While a 'Traversal' isn't quite a 'Fold', it _can_ be used for
-- 'Control.Lens.Getter.Getting' like a 'Fold', because given a
-- 'Data.Monoid.Monoid' @m@, we have an 'Applicative'
-- for @('Const' m)@. Everything you know how to do with a 'Traversable'
-- container, you can with with a 'Traversal', and here we provide
-- combinators that generalize the usual 'Traversable' operations.
-- A 'Traversal' is a 'Fold' if and only if it is 'Simple'. However, _any_
-- 'Traversal' can be used for 'Control.Lens.Getter.Getting' like a 'Fold',
-- because given a 'Data.Monoid.Monoid' @m@, we have an 'Applicative' for
-- @('Const' m)@. Everything you know how to do with a 'Traversable' container,
-- you can with a 'Traversal', and here we provide combinators that generalize
-- the usual 'Traversable' operations.
----------------------------------------------------------------------------
module Control.Lens.Traversal
(
Expand Down

0 comments on commit 22e5a4f

Please sign in to comment.