Monocle
- Source
- Monocle.scala
Value members
Inherited methods
get the immediate self-similar children of a target
get the immediate self-similar children of a target
- Inherited from
- PlatedFunctions
- Source
- Plated.scala
- Inherited from
- NonEmptyChainOptics
- Source
- NonEmptyChain.scala
- Inherited from
- NonEmptyListOptics
- Source
- NonEmptyList.scala
- Inherited from
- NonEmptyVectorOptics
- Source
- NonEmptyVector.scala
- Inherited from
- NonEmptyListOptics
- Source
- NonEmptyList.scala
- Inherited from
- NonEmptyVectorOptics
- Source
- NonEmptyVector.scala
- Inherited from
- ValidatedOptics
- Source
- Validated.scala
Traversal of immediate self-similar children
Traversal of immediate self-similar children
- Inherited from
- CommonPlatedFunctions
- Source
- Plated.scala
delete a value associated with a key in a Map-like container
delete a value associated with a key in a Map-like container
- Inherited from
- AtFunctions
- Source
- At.scala
rewrite a target by applying a rule as often as possible until it reaches a fixpoint (this is an infinite loop if there is no fixpoint)
rewrite a target by applying a rule as often as possible until it reaches a fixpoint (this is an infinite loop if there is no fixpoint)
- Inherited from
- PlatedFunctions
- Source
- Plated.scala
rewrite a target by applying a rule within a Setter, as often as possible until it reaches a fixpoint (this is an infinite loop if there is no fixpoint)
rewrite a target by applying a rule within a Setter, as often as possible until it reaches a fixpoint (this is an infinite loop if there is no fixpoint)
- Inherited from
- PlatedFunctions
- Source
- Plated.scala
transforming counting changes
transforming counting changes
- Inherited from
- PlatedFunctions
- Source
- Plated.scala
transforming every element using monadic transformation
transforming every element using monadic transformation
- Inherited from
- PlatedFunctions
- Source
- Plated.scala
transform every element by applying a Setter
transform every element by applying a Setter
- Inherited from
- PlatedFunctions
- Source
- Plated.scala
get all transitive self-similar elements of a target, including itself
get all transitive self-similar elements of a target, including itself
- Inherited from
- PlatedFunctions
- Source
- Plated.scala
Creates an Iso that maps None
to defaultValue
and inversely.
Creates an Iso that maps None
to defaultValue
and inversely.
val defaultTo0 = withDefault(0)
defaultTo0.get(None) == 0
defaultTo0.get(Some(1)) == 1
defaultTo0.reverseGet(0) == None
defaultTo0.reverseGet(1) == Some(1)
withDefault
is a valid Iso only if we consider the set of A
without defaultValue
.
For example, Some(0)
breaks the round-trip property of Iso:
defaultTo0.reverseGet(defaultTo0.get(Some(0))) == None
- See also
This method is called
non
in Haskell Lens.- Inherited from
- OptionOptics
- Source
- Option.scala
Deprecated and Inherited methods
- Deprecated
[Since version 3.0.0-M2]
- Inherited from
- FieldsSyntax
- Source
- Fields.scala
- Deprecated
[Since version 3.0.0-M2]
- Inherited from
- FieldsSyntax
- Source
- Fields.scala
- Deprecated
[Since version 3.0.0-M2]
- Inherited from
- FieldsSyntax
- Source
- Fields.scala
- Deprecated
[Since version 3.0.0-M2]
- Inherited from
- FieldsSyntax
- Source
- Fields.scala
- Deprecated
[Since version 3.0.0-M2]
- Inherited from
- FieldsSyntax
- Source
- Fields.scala
- Deprecated
[Since version 3.0.0-M2]
- Inherited from
- FieldsSyntax
- Source
- Fields.scala
append an element to the head
append an element to the head
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- ConsFunctions
- Source
- Cons.scala
append an element to the head
append an element to the head
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- Cons1Functions
- Source
- Cons1.scala
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- EmptyFunctions
- Source
- Empty.scala
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- EmptyFunctions
- Source
- Empty.scala
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- ReverseFunctions
- Source
- Reverse.scala
append an element to the end
append an element to the end
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- SnocFunctions
- Source
- Snoc.scala
append an element to the end
append an element to the end
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- Snoc1Functions
- Source
- Snoc1.scala
deconstruct an S between its head and tail
deconstruct an S between its head and tail
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- ConsFunctions
- Source
- Cons.scala
deconstruct an S between its head and tail
deconstruct an S between its head and tail
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- Cons1Functions
- Source
- Cons1.scala
deconstruct an S between its init and last
deconstruct an S between its init and last
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- SnocFunctions
- Source
- Snoc.scala
deconstruct an S between its init and last
deconstruct an S between its init and last
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- Snoc1Functions
- Source
- Snoc1.scala
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- ConsFunctions
- Source
- Cons.scala
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- Cons1Functions
- Source
- Cons1.scala
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- CurryFunctions
- Source
- Curry.scala
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- EmptyFunctions
- Source
- Empty.scala
- Deprecated
[Since version 3.0.0-M2]
- Inherited from
- Field5Functions
- Source
- Field5.scala
- Deprecated
[Since version 3.0.0-M2]
- Inherited from
- Field1Functions
- Source
- Field1.scala
- Deprecated
[Since version 3.0.0-M2]
- Inherited from
- Field4Functions
- Source
- Field4.scala
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- Cons1Functions
- Source
- Cons1.scala
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- ConsFunctions
- Source
- Cons.scala
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- Snoc1Functions
- Source
- Snoc1.scala
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- SnocFunctions
- Source
- Snoc.scala
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- Snoc1Functions
- Source
- Snoc1.scala
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- SnocFunctions
- Source
- Snoc.scala
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- PossibleFunctions
- Source
- Possible.scala
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- ReverseFunctions
- Source
- Reverse.scala
- Deprecated
[Since version 3.0.0-M2]
- Inherited from
- Field2Functions
- Source
- Field2.scala
- Deprecated
[Since version 3.0.0-M2]
- Inherited from
- Field6Functions
- Source
- Field6.scala
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- SnocFunctions
- Source
- Snoc.scala
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- Snoc1Functions
- Source
- Snoc1.scala
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- Cons1Functions
- Source
- Cons1.scala
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- ConsFunctions
- Source
- Cons.scala
- Deprecated
[Since version 3.0.0-M2]
- Inherited from
- Field3Functions
- Source
- Field3.scala
- Deprecated
[Since version 3.0.0-M1]
- Inherited from
- CurryFunctions
- Source
- Curry.scala