PSetter

trait PSetter[S, T, A, B] extends Serializable

A PSetter is a generalisation of Functor map:

A PSetter is a generalisation of Functor map:

  • map: (A => B) => F[A] => F[B]
  • modify: (A => B) => S => T

PSetter stands for Polymorphic Setter as it replace and modify methods change a type A to B and S to T. Setter is a type alias for PSetter restricted to monomorphic updates:

type Setter[S, A] = PSetter[S, S, A, A]

PTraversal, POptional, PPrism, PLens and PIso are valid PSetter

Type Params
A

the target of a PSetter

B

the modified target of a PSetter

S

the source of a PSetter

T

the modified source of a PSetter

See also
Companion
object
Source
Setter.scala
trait Serializable
class Object
trait Matchable
class Any
trait PTraversal[S, T, A, B]
trait POptional[S, T, A, B]
trait PLens[S, T, A, B]
trait PIso[S, T, A, B]
trait PPrism[S, T, A, B]

Value members

Abstract methods

def modify(f: A => B): S => T

modify polymorphically the target of a PSetter with a function

modify polymorphically the target of a PSetter with a function

Source
Setter.scala
def replace(b: B): S => T

replace polymorphically the target of a PSetter with a value

replace polymorphically the target of a PSetter with a value

Source
Setter.scala

Concrete methods

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

compose a PSetter with another PSetter

compose a PSetter with another PSetter

Source
Setter.scala
def some[A1, B1](ev1: A =:= Option[A1], ev2: B =:= Option[B1]): PSetter[S, T, A1, B1]

Deprecated methods

@deprecated("use andThen", since = "3.0.0-M1")
def ^<->[C, D](other: PIso[A, B, C, D]): PSetter[S, T, C, D]
Implicitly added by pSetterSyntax

alias to composeIso

alias to composeIso

Deprecated
[Since version 3.0.0-M1]
Source
Setter.scala
@deprecated("use andThen", since = "3.0.0-M1")
def ^<-?[C, D](other: PPrism[A, B, C, D]): PSetter[S, T, C, D]
Implicitly added by pSetterSyntax

alias to composePrism

alias to composePrism

Deprecated
[Since version 3.0.0-M1]
Source
Setter.scala
@deprecated("use andThen", since = "3.0.0-M1")
def ^|->[C, D](other: PLens[A, B, C, D]): PSetter[S, T, C, D]
Implicitly added by pSetterSyntax

alias to composeLens

alias to composeLens

Deprecated
[Since version 3.0.0-M1]
Source
Setter.scala
@deprecated("use andThen", since = "3.0.0-M1")
def ^|->>[C, D](other: PTraversal[A, B, C, D]): PSetter[S, T, C, D]
Implicitly added by pSetterSyntax

alias to composeTraversal

alias to composeTraversal

Deprecated
[Since version 3.0.0-M1]
Source
Setter.scala
@deprecated("use andThen", since = "3.0.0-M1")
def ^|-?[C, D](other: POptional[A, B, C, D]): PSetter[S, T, C, D]
Implicitly added by pSetterSyntax

alias to composeOptional

alias to composeOptional

Deprecated
[Since version 3.0.0-M1]
Source
Setter.scala
@deprecated("use andThen", since = "3.0.0-M1")
def composeIso[C, D](other: PIso[A, B, C, D]): PSetter[S, T, C, D]
Implicitly added by pSetterSyntax

compose a PSetter with a PIso

compose a PSetter with a PIso

Deprecated
[Since version 3.0.0-M1]
Source
Setter.scala
@deprecated("use andThen", since = "3.0.0-M1")
def composeLens[C, D](other: PLens[A, B, C, D]): PSetter[S, T, C, D]
Implicitly added by pSetterSyntax

compose a PSetter with a PLens

compose a PSetter with a PLens

Deprecated
[Since version 3.0.0-M1]
Source
Setter.scala
@deprecated("use andThen", since = "3.0.0-M1")
def composeOptional[C, D](other: POptional[A, B, C, D]): PSetter[S, T, C, D]
Implicitly added by pSetterSyntax

compose a PSetter with a POptional

compose a PSetter with a POptional

Deprecated
[Since version 3.0.0-M1]
Source
Setter.scala
@deprecated("use andThen", since = "3.0.0-M1")
def composePrism[C, D](other: PPrism[A, B, C, D]): PSetter[S, T, C, D]
Implicitly added by pSetterSyntax

compose a PSetter with a PPrism

compose a PSetter with a PPrism

Deprecated
[Since version 3.0.0-M1]
Source
Setter.scala
@deprecated("use andThen", since = "3.0.0-M1")
def composeSetter[C, D](other: PSetter[A, B, C, D]): PSetter[S, T, C, D]
Implicitly added by pSetterSyntax

compose a PSetter with a PSetter

compose a PSetter with a PSetter

Deprecated
[Since version 3.0.0-M1]
Source
Setter.scala
@deprecated("use andThen", since = "3.0.0-M1")
def composeTraversal[C, D](other: PTraversal[A, B, C, D]): PSetter[S, T, C, D]
Implicitly added by pSetterSyntax

compose a PSetter with a PTraversal

compose a PSetter with a PTraversal

Deprecated
[Since version 3.0.0-M1]
Source
Setter.scala
@deprecated("use replace instead", since = "3.0.0-M1")
def set(b: B): S => T

alias to replace

alias to replace

Deprecated
[Since version 3.0.0-M1]
Source
Setter.scala

Inherited methods

def productElementNames: Iterator[String]
Implicitly added by pSetterSyntax
Inherited from
Product
def productIterator: Iterator[Any]
Implicitly added by pSetterSyntax
Inherited from
Product