Safe Haskell | None |
---|---|
Language | Haskell2010 |
TODO: what's affine fold.
Synopsis
- data An_AffineFold :: OpticKind
- type AffineFold s a = Optic' An_AffineFold '[] s a
- view01 :: Is k An_AffineFold => Optic' k is s a -> s -> Maybe a
- afolding :: (s -> Maybe a) -> AffineFold s a
- module Optics.Optic
Documentation
data An_AffineFold :: OpticKind #
Tag for an affine fold.
Instances
type AffineFold s a = Optic' An_AffineFold '[] s a #
Type synonym for an affine fold.
afolding :: (s -> Maybe a) -> AffineFold s a #
Create a an AffineFold
from a partial function.
>>>
view01 (afolding listToMaybe) "foo"
Just 'f'
module Optics.Optic