A Fold can be seen as a Getter with many targets or a weaker PTraversal which cannot modify its target.
A Fold can be seen as a Getter with many targets or a weaker PTraversal which cannot modify its target.
Fold is on the top of the Optic hierarchy which means that Getter, PTraversal, POptional, PLens, PPrism and PIso are valid Fold
- Type Params
- Companion
- object
- Source
- Fold.scala
Value members
Abstract methods
map each target to a Monoid and combine the results underlying representation of Fold, all Fold methods are defined in terms of foldMap
map each target to a Monoid and combine the results underlying representation of Fold, all Fold methods are defined in terms of foldMap
- Source
- Fold.scala
Concrete methods
check if all targets satisfy the predicate
check if all targets satisfy the predicate
- Source
- Fold.scala
check if at least one target satisfies the predicate
check if at least one target satisfies the predicate
- Source
- Fold.scala
Select all the elements which satisfies the predicate. This combinator can break the fusion property see Optional.filter for more details.
Select all the elements which satisfies the predicate. This combinator can break the fusion property see Optional.filter for more details.
- Source
- Fold.scala
find the first target matching the predicate
find the first target matching the predicate
- Source
- Fold.scala
combine all targets using a target's Monoid
combine all targets using a target's Monoid
- Source
- Fold.scala
Compose with a function lifted into a Getter
Compose with a function lifted into a Getter
- Source
- Fold.scala
Deprecated methods
alias to composeIso
alias to composeIso
- Deprecated
[Since version 3.0.0-M1]
- Source
- Fold.scala
alias to composePrism
alias to composePrism
- Deprecated
[Since version 3.0.0-M1]
- Source
- Fold.scala
alias to composeLens
alias to composeLens
- Deprecated
[Since version 3.0.0-M1]
- Source
- Fold.scala
alias to composeTraversal
alias to composeTraversal
- Deprecated
[Since version 3.0.0-M1]
- Source
- Fold.scala
alias to composeOptional
alias to composeOptional
- Deprecated
[Since version 3.0.0-M1]
- Source
- Fold.scala
- Deprecated
[Since version 3.0.0-M1]
- Source
- Fold.scala
- Deprecated
[Since version 3.0.0-M1]
- Source
- Fold.scala
- Deprecated
[Since version 3.0.0-M1]
- Source
- Fold.scala
- Deprecated
[Since version 3.0.0-M1]
- Source
- Fold.scala
- Deprecated
[Since version 3.0.0-M1]
- Source
- Fold.scala
- Deprecated
[Since version 3.0.0-M1]
- Source
- Fold.scala
compose a Fold with a PTraversal
compose a Fold with a PTraversal
- Deprecated
[Since version 3.0.0-M1]
- Source
- Fold.scala
- Deprecated
[Since version 3.0.0-M4]
- Source
- Fold.scala
- Deprecated
[Since version 3.0.0-M4]
- Source
- Fold.scala