dev.constructive.eo.optics.AffineFold
Attributes
- Source
-
AffineFold.scala
- Graph
-
- Supertypes
-
class Object
trait Matchable
class Any
- Self type
-
Members list
Constructors
Build from matches: S => Option[A].
Build from matches: S => Option[A].
Attributes
- Example
-
case class Person(age: Int)
val adultAge = AffineFold[Person, Int](p => Option.when(p.age >= 18)(p.age))
- Source
-
AffineFold.scala
Filtering — hits only on inputs satisfying p. @group Constructors
Filtering — hits only on inputs satisfying p. @group Constructors
Attributes
- Source
-
AffineFold.scala