Index

fun interface Index<S, I, A>(source)

Index provides an Optional for a structure S to focus in an optional A at a given index I.

Parameters

S

source of Optional

I

index

A

focus of Optional, A is supposed to be unique for a given pair S and I.

Types

Link copied to clipboard
object Companion

Functions

Link copied to clipboard
open operator fun <T> Fold<T, S>.get(i: I): Fold<T, A>

DSL to compose Index with a Fold for a structure S to focus in on A at given index I.

open operator fun <T> Iso<T, S>.get(i: I): Optional<T, A>

DSL to compose Index with an Iso for a structure S to focus in on A at given index I.

open operator fun <T> Lens<T, S>.get(i: I): Optional<T, A>

DSL to compose Index with a Lens for a structure S to focus in on A at given index I.

open operator fun <T> Optional<T, S>.get(i: I): Optional<T, A>

DSL to compose Index with an Optional for a structure S to focus in on A at given index I.

open operator fun <T> Prism<T, S>.get(i: I): Optional<T, A>

DSL to compose Index with a Prism for a structure S to focus in on A at given index I.

open operator fun <T> Setter<T, S>.get(i: I): Setter<T, A>

DSL to compose Index with a Setter for a structure S to focus in on A at given index I.

open operator fun <T> Traversal<T, S>.get(i: I): Traversal<T, A>

DSL to compose Index with a Traversal for a structure S to focus in on A at given index I.

Link copied to clipboard
abstract fun index(i: I): Optional<S, A>

Get Optional focus A for a structure S at index i.

Link copied to clipboard
open fun <T> Fold<T, S>.index(i: I): Fold<T, A>

DSL to compose Index with a Fold for a structure S to focus in on A at given index I.

open fun <T> Iso<T, S>.index(i: I): Optional<T, A>

DSL to compose Index with an Iso for a structure S to focus in on A at given index I.

open fun <T> Lens<T, S>.index(i: I): Optional<T, A>

DSL to compose Index with a Lens for a structure S to focus in on A at given index I.

open fun <T> Optional<T, S>.index(i: I): Optional<T, A>

DSL to compose Index with an Optional for a structure S to focus in on A at given index I.

open fun <T> Prism<T, S>.index(i: I): Optional<T, A>

DSL to compose Index with a Prism for a structure S to focus in on A at given index I.

open fun <T> Setter<T, S>.index(i: I): Setter<T, A>

DSL to compose Index with a Setter for a structure S to focus in on A at given index I.

open fun <T> Traversal<T, S>.index(i: I): Traversal<T, A>

DSL to compose Index with a Traversal for a structure S to focus in on A at given index I.