Module

Data.Lens.AffineTraversal

Package
profunctor-lenses
Repository
purerl/purescript-profunctor-lenses

This module defines functions for working with affine traversals. An AffineTraversal is a Traversal that applies to at most one element.

These arise most frequently as the composition of a Lens with a Prism.

#affineTraversal Source

affineTraversal :: forall s t a b. (s -> b -> t) -> (s -> Either t a) -> AffineTraversal s t a b

#affineTraversal' Source

affineTraversal' :: forall s t a b. (s -> Tuple (b -> t) (Either t a)) -> AffineTraversal s t a b

#withAffineTraversal Source

withAffineTraversal :: forall s t a b r. AnAffineTraversal s t a b -> ((s -> b -> t) -> (s -> Either t a) -> r) -> r

#cloneAffineTraversal Source

cloneAffineTraversal :: forall s t a b. AnAffineTraversal s t a b -> AffineTraversal s t a b

Re-exports from Data.Lens.Types

#AnAffineTraversal' Source

#AnAffineTraversal Source

type AnAffineTraversal s t a b = Optic (Stall a b) s t a b

#AffineTraversal' Source

#AffineTraversal Source

type AffineTraversal s t a b = forall p. Strong p => Choice p => Optic p s t a b

An affine traversal (has at most one focus, but is not a prism).