filterIndex

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

Receiver

Optional with a focus in S

Return

Optional with a focus in A at given index I

Parameters

filter

FilterIndex instance to provide a Optional to focus into S at I

i

index I to focus into S and find focus A


fun <T, A> Traversal<T, List<A>>.filterIndex(predicate: Predicate<Int>): Traversal<T, A>
@JvmName(name = "filterNonEmptyList")
fun <T, A> Traversal<T, NonEmptyList<A>>.filterIndex(predicate: Predicate<Int>): Traversal<T, A>
@JvmName(name = "filterSequence")
fun <T, A> Traversal<T, Sequence<A>>.filterIndex(predicate: Predicate<Int>): Traversal<T, A>
@JvmName(name = "filterValues")
fun <T, K, A> Traversal<T, Map<K, A>>.filterIndex(predicate: Predicate<K>): Traversal<T, A>
@JvmName(name = "filterChars")
fun <T> Traversal<T, String>.filterIndex(predicate: Predicate<Int>): Traversal<T, Char>