satisfy

fun <S> satisfy(f: (S) -> Boolean): Parser<S, S>

A parser that matches a symbol satisfying a given predicate.

Return

A parser that returns the matched symbol and the next index if the predicate is satisfied.

Parameters

f

The predicate to satisfy.