Idris2Doc : Control.Lens.Fold

Control.Lens.Fold

(source)

Definitions

recordIsFold : (Type->Type->Type) ->Type
Totality: total
Visibility: public export
Constructor: 
MkIsFold : (Traversingp, Bicontravariantp) ->IsFoldp

Projection: 
.runIsFold : IsFoldp-> (Traversingp, Bicontravariantp)

Hints:
IsFoldp=>IsOptFoldp
IsFoldp=>IsTraversalp
.runIsFold : IsFoldp-> (Traversingp, Bicontravariantp)
Totality: total
Visibility: public export
runIsFold : IsFoldp-> (Traversingp, Bicontravariantp)
Totality: total
Visibility: public export
foldToOptFold : IsFoldp=>IsOptFoldp
Totality: total
Visibility: export
foldToTraversal : IsFoldp=>IsTraversalp
Totality: total
Visibility: export
0Fold : Type->Type->Type
  A fold is a getter that accesses multiple focus elements.
`Fold s a` is equivalent to `s -> List a`.

Totality: total
Visibility: public export
0IndexedFold : Type->Type->Type->Type
  An indexed fold returns indices while getting.

Totality: total
Visibility: public export
folded : Foldablef=>Fold (fa) a
  Derive a fold from a `Foldable` implementation.

Totality: total
Visibility: public export
unfolded : (s->Maybe (a, s)) ->Foldsa
  Construct a fold from an unfolding function.

This function is not total, as it may result in an infinite amount
of focuses.

Visibility: public export
folding : Foldablef=> (s->fa) ->Foldsa
  Construct a fold from a function into a foldable container.

Totality: total
Visibility: public export
ifolding : Foldablef=> (s->f (i, a)) ->IndexedFoldisa
  Construct an indexed fold from a function into a foldable container.

Totality: total
Visibility: public export
backwards : Foldsa->Foldsa
  Reverse the order of a fold's focuses.

Totality: total
Visibility: public export
replicated : Nat->Foldaa
  Construct a fold that replicates the input n times.

Totality: total
Visibility: public export
foldMapOf : Monoidm=>Foldsa-> (a->m) ->s->m
  Map each focus of an optic to a monoid value and combine them.

Totality: total
Visibility: public export
ifoldMapOf : Monoidm=>IndexedFoldisa-> (i->a->m) ->s->m
  Map each focus of an optic to a monoid value with access to the index and
combine them.

Totality: total
Visibility: public export
foldrOf : Foldsa-> (a->acc->acc) ->acc->s->acc
  Combine the focuses of an optic using the provided function, starting from
the right.

Totality: total
Visibility: public export
ifoldrOf : IndexedFoldisa-> (i->a->acc->acc) ->acc->s->acc
  Combine the focuses of an optic using the provided function with access to
the index, starting from the right.

Totality: total
Visibility: public export
foldlOf : Foldsa-> (acc->a->acc) ->acc->s->acc
  Combine the focuses of an optic using the provided function, starting from
the left.

Totality: total
Visibility: public export
ifoldlOf : IndexedFoldisa-> (i->acc->a->acc) ->acc->s->acc
  Combine the focuses of an optic using the provided function with access to
the index, starting from the left.

Totality: total
Visibility: public export
concatOf : Monoidm=>Foldsm->s->m
  Combine each focus value of an optic using a monoid structure.

Totality: total
Visibility: public export
choiceOf : Alternativef=>Folds (Lazy (fa)) ->s->fa
  Fold over the focuses of an optic using Alternative.

Totality: total
Visibility: public export
sequenceOf_ : Applicativef=>Folds (fa) ->s->f ()
  Evaluate each computation of an optic and discard the results.

Totality: total
Visibility: public export
traverseOf_ : Applicativef=>Foldsa-> (a->fb) ->s->f ()
  Map each focus of an optic to a computation, evaluate those
computations and discard the results.

Totality: total
Visibility: public export
itraverseOf_ : Applicativef=>IndexedFoldisa-> (i->a->fb) ->s->f ()
  Map each focus of an optic to a computation with access to the index,
evaluate those computations and discard the results.

Totality: total
Visibility: public export
forOf_ : Applicativef=>Foldsa->s-> (a->fb) ->f ()
  A version of `traverseOf_` with the arguments flipped.

Totality: total
Visibility: public export
iforOf_ : Applicativef=>IndexedFoldisa->s-> (i->a->fb) ->f ()
  A version of `itraverseOf_` with the arguments flipped.

Totality: total
Visibility: public export
andOf : Folds (Lazy Bool) ->s->Bool
  The conjunction of an optic containing lazy boolean values.

Totality: total
Visibility: public export
orOf : Folds (Lazy Bool) ->s->Bool
  The disjunction of an optic containing lazy boolean values.

Totality: total
Visibility: public export
allOf : Foldsa-> (a->Bool) ->s->Bool
  Return `True` if all focuses of the optic satisfy the predicate.

Totality: total
Visibility: public export
iallOf : IndexedFoldisa-> (i->a->Bool) ->s->Bool
  Return `True` if all focuses of the indexed optic satisfy the predicate.

Totality: total
Visibility: public export
anyOf : Foldsa-> (a->Bool) ->s->Bool
  Return `True` if any focuses of the optic satisfy the predicate.

Totality: total
Visibility: public export
ianyOf : IndexedFoldisa-> (i->a->Bool) ->s->Bool
  Return `True` if any focuses of the indexed optic satisfy the predicate.

Totality: total
Visibility: public export
elemOf : Eqa=>Foldsa->a->s->Bool
  Return `True` if the element occurs in the focuses of the optic.

Totality: total
Visibility: public export
lengthOf : Foldsa->s->Nat
  Calculate the number of focuses of the optic.

Totality: total
Visibility: public export
firstOf : Foldsa->s->Maybea
  Access the first focus value of an optic, returning `Nothing` if there are
no focuses.

This is identical to `preview`.

Totality: total
Visibility: public export
ifirstOf : IndexedFoldisa->s->Maybe (i, a)
  Access the first focus value and index of an indexed optic, returning Nothing
if there are no focuses.

This is identical to `ipreview`.

Totality: total
Visibility: public export
lastOf : Foldsa->s->Maybea
  Access the last focus value of an optic, returning `Nothing` if there are
no focuses.

Totality: total
Visibility: public export
ilastOf : IndexedFoldisa->s->Maybe (i, a)
  Access the last focus value and index of an indexed optic, returning Nothing
if there are no focuses.

Totality: total
Visibility: public export
has : Foldsa->s->Bool
  Return `True` if the optic focuses on any values.

Totality: total
Visibility: public export
hasn't : Foldsa->s->Bool
  Return `True` if the optic does not focus on any values.

Totality: total
Visibility: public export
previews : Foldsa-> (a->r) ->s->Mayber
  Access the first focus value of an optic and apply a function to it,
returning `Nothing` if there are no focuses.

Totality: total
Visibility: public export
preview : Foldsa->s->Maybea
  Access the first focus value of an optic, returning `Nothing` if there are
no focuses.

This is an alias for `firstOf`.

Totality: total
Visibility: public export
(^?) : s->Foldsa->Maybea
  Access the first focus value of an optic, returning `Nothing` if there are
no focuses.

This is the operator form of `preview`.

Totality: total
Visibility: public export
Fixity Declaration: infixl operator, level 8
ipreview : IndexedFoldisa->s->Maybe (i, a)
  Access the first focus value and index of an indexed optic, returning Nothing
if there are no focuses.

This is an alias for `ifirstOf`.

Totality: total
Visibility: public export
(^@?) : s->IndexedFoldisa->Maybe (i, a)
  Access the first focus value and index of an indexed optic, returning Nothing
if there are no focuses.

This is the operator form of `ipreview`.

Totality: total
Visibility: public export
Fixity Declaration: infixl operator, level 8
pre : Foldsa->OptionalFoldsa
  Convert a `Fold` into an `OptionalFold` that accesses the first focus element.

For the traversal version of this, see `singular`.

Totality: total
Visibility: public export
ipre : IndexedFoldisa->IndexedOptionalFoldisa
  Convert an `IndexedFold` into an `IndexedOptionalFold` that accesses the
first focus element.

For the traversal version of this, see `isingular`.

Totality: total
Visibility: public export
toListOf : Foldsa->s->Lista
  Return a list of all focuses of a fold.

Totality: total
Visibility: public export
(^..) : s->Foldsa->Lista
  Return a list of all focuses of a fold.

This is the operator form of `toListOf`.

Totality: total
Visibility: public export
itoListOf : IndexedFoldisa->s->List (i, a)
  Return a list of all focuses and indices of an indexed fold.

Totality: total
Visibility: public export
(^@..) : s->IndexedFoldisa->List (i, a)
  Return a list of all focuses and indices of an indexed fold.

This is the operator form of `itoListOf`.

Totality: total
Visibility: public export