Optional

object Optional
class Object
trait Matchable
class Any

Value members

Concrete methods

def apply[S, A](get: S => OpticResult[OpticFailure, A], set: A => S => OpticResult[OpticFailure, S]): Optional[S, A]

Constructs an Optional from a get and a set function.

Constructs an Optional from a get and a set function.

def at[A](n: Int): Optional[Chunk[A], A]

An optic that accesses the specified index of a chunk.

An optic that accesses the specified index of a chunk.

def head[A]: Optional[List[A], A]

An optic that accesses the head of a list.

An optic that accesses the head of a list.

def key[K, V](k: K): Optional[Map[K, V], V]

An optic that accesses the value at the specified key in a map.

An optic that accesses the value at the specified key in a map.

def tail[A]: Optional[List[A], List[A]]

An optic that accesses the tail of a list.

An optic that accesses the tail of a list.