In case I’m delayed in cutting a release it’s pret...
# strikt
r
In case I’m delayed in cutting a release it’s pretty easy to just adapt the existing implementation of
all
like this:
Copy code
infix fun <T : Iterable<E>, E> Builder<T>.allIndexed(predicate: Builder<E>.(Int) -> Unit): Builder<T> =
  compose("all elements match:") { subject ->
    subject.forEachIndexed { index, element ->
      get("%s") { element }.apply { predicate(index) }
    }
  } then {
    if (allPassed) pass() else fail()
  }