Fold_

abstract class Fold_[S, T, A, B]

A Fold_ is a generalization of something Foldable. It describes how to retrieve multiple values.

A Fold_ is similar to a Traversal_, but it cannot modify its foci.

A Fold_ is an Optic with fixed type proptics.internal.Forget cats.arrow.Profunctor

Type parameters:
A

the foci of a Fold_

B

the modified foci of a Fold_

S

the source of a Fold_

T

the modified source of a Fold_

Companion:
object
class Object
trait Matchable
class Any
Fold_[S, T, A, B]

Value members

Concrete methods

final def andThen[C, D](other: Iso_[A, B, C, D]): Fold_[S, T, C, D]

compose this Fold_ with an Iso_, having this Fold_ applied first

compose this Fold_ with an Iso_, having this Fold_ applied first

final def andThen[C, D](other: AnIso_[A, B, C, D]): Fold_[S, T, C, D]

compose this Fold_ with an AnIso_, having this Fold_ applied first

compose this Fold_ with an AnIso_, having this Fold_ applied first

final def andThen[C, D](other: Lens_[A, B, C, D]): Fold_[S, T, C, D]

compose this Fold_ with a Lens_, having this Fold_ applied first

compose this Fold_ with a Lens_, having this Fold_ applied first

final def andThen[C, D](other: ALens_[A, B, C, D]): Fold_[S, T, C, D]

compose this Fold_ with an ALens_, having this Fold_ applied first

compose this Fold_ with an ALens_, having this Fold_ applied first

final def andThen[C, D](other: Prism_[A, B, C, D]): Fold_[S, T, C, D]

compose this Fold_ with a Prism_, having this Fold_ applied first

compose this Fold_ with a Prism_, having this Fold_ applied first

final def andThen[C, D](other: APrism_[A, B, C, D]): Fold_[S, T, C, D]

compose this Fold_ with an APrism_, having this Fold_ applied first

compose this Fold_ with an APrism_, having this Fold_ applied first

final def andThen[C, D](other: AffineTraversal_[A, B, C, D]): Fold_[S, T, C, D]

compose this Fold_ with a AffineTraversal_, having this Fold_ applied first

compose this Fold_ with a AffineTraversal_, having this Fold_ applied first

final def andThen[C, D](other: AnAffineTraversal_[A, B, C, D]): Fold_[S, T, C, D]

compose this Fold_ with a AnAffineTraversal_, having this Fold_ applied first

compose this Fold_ with a AnAffineTraversal_, having this Fold_ applied first

final def andThen[C, D](other: Traversal_[A, B, C, D]): Fold_[S, T, C, D]

compose this Fold_ with a Traversal_, having this Fold_ applied first

compose this Fold_ with a Traversal_, having this Fold_ applied first

final def andThen[C, D](other: ATraversal_[A, B, C, D]): Fold_[S, T, C, D]

compose this Fold_ with an ATraversal_, having this Fold_ applied first

compose this Fold_ with an ATraversal_, having this Fold_ applied first

final def andThen[C, D](other: Getter_[A, B, C, D]): Fold_[S, T, C, D]

compose this Fold_ with a Getter_, having this Fold_ applied first

compose this Fold_ with a Getter_, having this Fold_ applied first

final def andThen[C, D](other: Fold_[A, B, C, D]): Fold_[S, T, C, D]

compose this Fold_ with a Fold_, having this Fold_ applied first

compose this Fold_ with a Fold_, having this Fold_ applied first

final def andThen[I, C, D](other: IndexedLens_[I, A, B, C, D]): IndexedFold_[I, S, T, C, D]

compose this Fold_ with an IndexedLens_, having this Fold_ applied first

compose this Fold_ with an IndexedLens_, having this Fold_ applied first

final def andThen[I, C, D](other: AnIndexedLens_[I, A, B, C, D]): IndexedFold_[I, S, T, C, D]

compose this Fold_ with an AnIndexedLens_, having this Fold_ applied first

compose this Fold_ with an AnIndexedLens_, having this Fold_ applied first

final def andThen[I, C, D](other: IndexedTraversal_[I, A, B, C, D]): IndexedFold_[I, S, T, C, D]

compose this Fold_ with an IndexedTraversal_, having this Fold_ applied first

compose this Fold_ with an IndexedTraversal_, having this Fold_ applied first

final def andThen[I, C, D](other: IndexedGetter_[I, A, B, C, D]): IndexedFold_[I, S, T, C, D]

compose this Fold_ with an IndexedGetter_, having this Fold_ applied first

compose this Fold_ with an IndexedGetter_, having this Fold_ applied first

final def andThen[I, C, D](other: IndexedFold_[I, A, B, C, D]): IndexedFold_[I, S, T, C, D]

compose this Fold_ with an IndexedFold_, having this Fold_ applied first

compose this Fold_ with an IndexedFold_, having this Fold_ applied first

final def asIndexableFold: IndexedFold_[Int, S, T, A, B]

convert a Fold_ to an IndexedFold_ by using the integer positions as indices

convert a Fold_ to an IndexedFold_ by using the integer positions as indices

final def compose[C, D](other: Iso_[C, D, S, T]): Fold_[C, D, A, B]

compose this Fold_ with an Iso_, having this Fold_ applied last

compose this Fold_ with an Iso_, having this Fold_ applied last

final def compose[C, D](other: AnIso_[C, D, S, T]): Fold_[C, D, A, B]

compose this Fold_ with an AnIso_, having this Fold_ applied last

compose this Fold_ with an AnIso_, having this Fold_ applied last

final def compose[C, D](other: Lens_[C, D, S, T]): Fold_[C, D, A, B]

compose this Fold_ with a Lens_, having this Fold_ applied last

compose this Fold_ with a Lens_, having this Fold_ applied last

final def compose[C, D](other: ALens_[C, D, S, T]): Fold_[C, D, A, B]

compose this Fold_ with an ALens_, having this Fold_ applied last

compose this Fold_ with an ALens_, having this Fold_ applied last

final def compose[C, D](other: Prism_[C, D, S, T]): Fold_[C, D, A, B]

compose this Fold_ with a Prism_, having this Fold_ applied last

compose this Fold_ with a Prism_, having this Fold_ applied last

final def compose[C, D](other: APrism_[C, D, S, T]): Fold_[C, D, A, B]

compose this Fold_ with an APrism_, having this Fold_ applied last

compose this Fold_ with an APrism_, having this Fold_ applied last

final def compose[C, D](other: AffineTraversal_[C, D, S, T]): Fold_[C, D, A, B]

compose this Fold_ with a AffineTraversal_, having this Fold_ applied last

compose this Fold_ with a AffineTraversal_, having this Fold_ applied last

final def compose[C, D](other: AnAffineTraversal_[C, D, S, T]): Fold_[C, D, A, B]

compose this Fold_ with a AnAffineTraversal_, having this Fold_ applied last

compose this Fold_ with a AnAffineTraversal_, having this Fold_ applied last

final def compose[C, D](other: Traversal_[C, D, S, T]): Fold_[C, D, A, B]

compose this Fold_ with a Traversal_, having this Fold_ applied last

compose this Fold_ with a Traversal_, having this Fold_ applied last

final def compose[C, D](other: ATraversal_[C, D, S, T]): Fold_[C, D, A, B]

compose this Fold_ with an ATraversal_, having this Fold_ applied last

compose this Fold_ with an ATraversal_, having this Fold_ applied last

final def compose[C, D](other: Getter_[C, D, S, T]): Fold_[C, D, A, B]

compose this Fold_ with a Getter_, having this Fold_ applied last

compose this Fold_ with a Getter_, having this Fold_ applied last

final def compose[C, D](other: Fold_[C, D, S, T]): Fold_[C, D, A, B]

compose this Fold_ with a Fold_, having this Fold_ applied last

compose this Fold_ with a Fold_, having this Fold_ applied last

final def compose[I, C, D](other: IndexedLens_[I, C, D, S, T]): IndexedFold_[I, C, D, A, B]

compose this Fold_ with an IndexedLens_, having this Fold_ applied last

compose this Fold_ with an IndexedLens_, having this Fold_ applied last

final def compose[I, C, D](other: AnIndexedLens_[I, C, D, S, T]): IndexedFold_[I, C, D, A, B]

compose this Fold_ with an AnIndexedLens_, having this Fold_ applied last

compose this Fold_ with an AnIndexedLens_, having this Fold_ applied last

final def compose[I, C, D](other: IndexedTraversal_[I, C, D, S, T]): IndexedFold_[I, C, D, A, B]

compose this Fold_ with an IndexedTraversal_, having this Fold_ applied last

compose this Fold_ with an IndexedTraversal_, having this Fold_ applied last

final def compose[I, C, D](other: IndexedGetter_[I, C, D, S, T]): IndexedFold_[I, C, D, A, B]

compose this Fold_ with an IndexedGetter_, having this Fold_ applied last

compose this Fold_ with an IndexedGetter_, having this Fold_ applied last

final def compose[I, C, D](other: IndexedFold_[I, C, D, S, T]): IndexedFold_[I, C, D, A, B]

compose this Fold_ with an IndexedFold_, having this Fold_ applied last

compose this Fold_ with an IndexedFold_, having this Fold_ applied last

final def focus[C, D](f: A => C): Fold_[S, T, C, D]

compose this Fold_ with a function lifted to a Getter_, having this Fold_ applied first

compose this Fold_ with a function lifted to a Getter_, having this Fold_ applied first

override def foldMap[R : Monoid](s: S)(f: A => R): R

map each focus of a Fold_ to a cats.Monoid, and combine the results

map each focus of a Fold_ to a cats.Monoid, and combine the results

Definition Classes
Fold1 -> Fold0
final override def view(s: S)(implicit ev: Monoid[A]): A

synonym for fold

synonym for fold

Definition Classes
Fold1

Inherited methods

final def and(s: S)(implicit ev: Heyting[A]): A

return the result of a conjunction of all foci of a Fold, using a spire.algebra.lattice.Heyting algebra

return the result of a conjunction of all foci of a Fold, using a spire.algebra.lattice.Heyting algebra

Inherited from:
Fold1 (hidden)
final def any[R : Heyting](s: S)(f: A => R): R

test whether a predicate holds for any focus of a Fold, using a spire.algebra.lattice.Heyting algebra

test whether a predicate holds for any focus of a Fold, using a spire.algebra.lattice.Heyting algebra

Inherited from:
Fold1 (hidden)
final def contains(a: A)(s: S)(implicit ev: Eq[A]): Boolean

test whether the focus of a Getter contains a given value

test whether the focus of a Getter contains a given value

Inherited from:
Getter0 (hidden)
final override def exists(f: A => Boolean): S => Boolean

test whether a predicate holds for the focus of a Fold

test whether a predicate holds for the focus of a Fold

Definition Classes
Fold0 -> Getter0
Inherited from:
Fold0 (hidden)
final override def find(f: A => Boolean): S => Option[A]

find the focus of an Fold that satisfies a predicate, if there is any

find the focus of an Fold that satisfies a predicate, if there is any

Definition Classes
Fold1 -> Getter0
Inherited from:
Fold1 (hidden)
final def first(s: S): Option[A]

find the first focus of a Fold, if there is any. Synonym for preview

find the first focus of a Fold, if there is any. Synonym for preview

Inherited from:
Fold1 (hidden)
final def fold(s: S)(implicit ev: Monoid[A]): A

fold the foci of a Fold using a cats.Monoid

fold the foci of a Fold using a cats.Monoid

Inherited from:
Fold1 (hidden)
final def foldLeft[R](s: S)(r: R)(f: (R, A) => R): R

fold the foci of a Fold using a binary operator, going left to right

fold the foci of a Fold using a binary operator, going left to right

Inherited from:
Fold1 (hidden)
final def foldRight[R](s: S)(r: R)(f: (A, R) => R): R

fold the foci of a Fold using a binary operator, going right to left

fold the foci of a Fold using a binary operator, going right to left

Inherited from:
Fold1 (hidden)
final override def forall(f: A => Boolean): S => Boolean

test whether there is no focus or a predicate holds for the focus of a Fold

test whether there is no focus or a predicate holds for the focus of a Fold

Definition Classes
Fold1 -> Fold0
Inherited from:
Fold1 (hidden)
final def forall[R : Heyting](s: S)(f: A => R): R

test whether there is no focus or a predicate holds for the focus of a Fold, using a spire.algebra.lattice.Heyting algebra

test whether there is no focus or a predicate holds for the focus of a Fold, using a spire.algebra.lattice.Heyting algebra

Inherited from:
Fold0 (hidden)
final def intercalate(s: S, a: A)(implicit ev0: Monoid[A], ev1: S <:< Iterable[A]): A

intercalate/insert an element between the existing elements while folding

intercalate/insert an element between the existing elements while folding

Inherited from:
Fold1 (hidden)
final def isEmpty(s: S): Boolean

check if the Fold does not contain a focus

check if the Fold does not contain a focus

Inherited from:
Fold0 (hidden)
final def last(s: S): Option[A]

find the last focus of a Fold, if there is any

find the last focus of a Fold, if there is any

Inherited from:
Fold1 (hidden)
final def length(s: S): Int

the number of foci of a Fold

the number of foci of a Fold

Inherited from:
Fold1 (hidden)
final def maximum(s: S)(implicit ev: Order[A]): Option[A]

the maximum of all foci of a Fold, if there is any

the maximum of all foci of a Fold, if there is any

Inherited from:
Fold1 (hidden)
final def minimum(s: S)(implicit ev: Order[A]): Option[A]

the minimum of all foci of a Fold, if there is any

the minimum of all foci of a Fold, if there is any

Inherited from:
Fold1 (hidden)
final def mkString(s: S, start: String, sep: String, end: String)(implicit ev: S <:< Iterable[A]): String

displays all foci of a Fold in a string using a start, end and a separator

displays all foci of a Fold in a string using a start, end and a separator

Inherited from:
Fold1 (hidden)
final def mkString(s: S, sep: String)(implicit ev: S <:< Iterable[A]): String

displays all foci of a Fold in a string using a separator

displays all foci of a Fold in a string using a separator

Inherited from:
Fold1 (hidden)
final def mkString(s: S)(implicit ev: S <:< Iterable[A]): String

displays all foci of a Fold in a string

displays all foci of a Fold in a string

Inherited from:
Fold1 (hidden)
final def nonEmpty(s: S): Boolean

check if the Fold contains a focus

check if the Fold contains a focus

Inherited from:
Fold0 (hidden)
final def notContains(a: A)(s: S)(implicit ev: Eq[A]): Boolean

test whether the focus of a Getter does not contain a given value

test whether the focus of a Getter does not contain a given value

Inherited from:
Getter0 (hidden)
final def notExists(f: A => Boolean): S => Boolean

test whether a predicate does not hold for the focus of a Getter

test whether a predicate does not hold for the focus of a Getter

Inherited from:
Getter0 (hidden)
final def or(s: S)(implicit ev: Heyting[A]): A

return the result of a disjunction of all foci of a Fold, using a spire.algebra.lattice.Heyting algebra

return the result of a disjunction of all foci of a Fold, using a spire.algebra.lattice.Heyting algebra

Inherited from:
Fold1 (hidden)
final def preview(s: S): Option[A]

view the first focus of a Fold, if there is any

view the first focus of a Fold, if there is any

Inherited from:
Fold0 (hidden)
final def product(s: S)(implicit ev: MultiplicativeMonoid[A]): A

the product of all foci of a Fold

the product of all foci of a Fold

Inherited from:
Fold1 (hidden)
final def sum(s: S)(implicit ev: AdditiveMonoid[A]): A

the sum of all foci of a Fold

the sum of all foci of a Fold

Inherited from:
Fold1 (hidden)
final def toArray[AA >: A](s: S)(implicit ev: ClassTag[AA]): Array[AA]

collect all the foci of a Fold into an Array

collect all the foci of a Fold into an Array

Inherited from:
Fold1 (hidden)
final def toList(s: S): List[A]

synonym for viewAll

synonym for viewAll

Inherited from:
Fold1 (hidden)
final def use(implicit ev: State[S, A]): State[S, List[A]]

collect all the foci of a Fold in the state of a monad

collect all the foci of a Fold in the state of a monad

Inherited from:
Fold1 (hidden)
final def viewAll(s: S): List[A]

collect all the foci of a Fold into aList

collect all the foci of a Fold into aList

Inherited from:
Fold1 (hidden)

Implicits

Inherited implicits

Inherited from:
FoldInstances (hidden)