PTraversal
A Traversal is an optic that allows to see into a structure with 0 to N foci.
Traversal is a generalisation of kotlin.collections.map and can be seen as a representation of modify. all methods are written in terms of modify
Parameters
S
the source of a PTraversal
T
the modified source of a PTraversal
A
the target of a PTraversal
B
the modified target of a PTraversal
Inheritors
Properties
Functions
Link copied to clipboard
Link copied to clipboard
Compose a PTraversal with a PTraversal
Link copied to clipboard
open infix fun <C, D> composeLazy(other: () -> PTraversal<in A, out B, out C, in D>): PTraversal<S, T, C, D>
Link copied to clipboard
fun <T, S, I, A> Traversal<T, S>.filterIndex(filter: FilterIndex<S, I, A>, predicate: Predicate<I>): Traversal<T, A>
DSL to compose FilterIndex with an Traversal for a structure S to focus in on A at given index I
Link copied to clipboard
Find the first element matching the predicate, if one exists.
Link copied to clipboard
Get the first target or null
Link copied to clipboard
Check if there is at least one target
Link copied to clipboard
Get the last target or null