Idris2Doc : Monocle.Fold

Monocle.Fold

(source)

Definitions

recordFold : Type->Type->Type->Type->Type
  A Fold is a composable data accessor, allowing us to extract
zero or more values of type `a` from a value of type `s`.

Like other optics, `Folds` can be composed sequentially via operator
`(~>)`.

This is a type constructor parameterized over four type parameters
of which two (`t` and `b`) are phantom types without any runtime
relevance. We need them in order to compose Folds with other
optics (see module `Monocle.Compose`).

Folds are mainly useful because almost all other optics can be
converted to Folds (with the exception of `Setter`s).

Totality: total
Visibility: public export
Constructor: 
F : (Monoidm=> (a->m) ->s->m) ->Foldstab

Projection: 
.foldMap_ : Foldstab->Monoidm=> (a->m) ->s->m

Hints:
OSeqIsoFoldFold
OSeqLensFoldFold
OSeqPrismGetterFold
OSeqPrismFoldFold
OSeqOptionalGetterFold
OSeqOptionalFoldFold
OSeqTraversalGetterFold
OSeqTraversalFoldFold
OSeqGetterPrismFold
OSeqGetterOptionalFold
OSeqGetterTraversalFold
OSeqGetterFoldFold
OSeqFoldFoldFold
OSeqFoldIsoFold
OSeqFoldLensFold
OSeqFoldPrismFold
OSeqFoldOptionalFold
OSeqFoldTraversalFold
OSeqFoldGetterFold
ToFoldFold
.foldMap_ : Foldstab->Monoidm=> (a->m) ->s->m
Totality: total
Visibility: public export
foldMap_ : Foldstab->Monoidm=> (a->m) ->s->m
Totality: total
Visibility: public export
fold_ : Foldablet=>Fold (ta) (ta) aa
  We can fold over every `Foldable`.

Totality: total
Visibility: public export
empty : Foldstab
  The empty Fold, which always yields zero values.

Totality: total
Visibility: public export
(~>) : Foldstab->Foldabcd->Foldstcd
  Sequential composition of Folds.

Totality: total
Visibility: public export
Fixity Declaration: infixl operator, level 0
interfaceToFold : (Type->Type->Type->Type->Type) ->Type
  Interface for converting other optics to Folds.

Parameters: o
Methods:
toFold : ostab->Foldstab

Implementations:
ToFoldIso
ToFoldGetter
ToFoldLens
ToFoldOptional
ToFoldPrism
ToFoldFold
ToFoldTraversal
toFold : ToFoldo=>ostab->Foldstab
Totality: total
Visibility: public export
foldMap : Monoidm=>ToFoldo=>ostab-> (a->m) ->s->m
  Use a Fold to extract data from a source value and accumulate it
via a `Monoid`.

Totality: total
Visibility: public export
fold : ToFoldo=>Monoida=>ostab->s->a
  Use a Fold to extract and accumulate data with a `Monoid` implementation
from a source value.

Totality: total
Visibility: public export
asList : ToFoldo=>ostab->s->Lista
  Use a Fold to extract data from a source value and store it in a `List`.

Totality: total
Visibility: public export
asSnocList : ToFoldo=>ostab->s->SnocLista
  Use a Fold to extract data from a source value and
store it in a `SnocList`.

Totality: total
Visibility: public export
first : ToFoldo=>ostab->s->Maybea
  Use a Fold to try and extract the first piece of data from a source value.

Totality: total
Visibility: public export
last : ToFoldo=>ostab->s->Maybea
  Use a Fold to try and extract the last piece of data from a source value.

Totality: total
Visibility: public export
find : ToFoldo=>ostab-> (a->Bool) ->s->Maybea
  Use a Fold to try and extract the first piece of data
fulfilling a predicate from a source value.

Totality: total
Visibility: public export