Package: effect
Module: STM
Iterates with the specified transactional function. The moral equivalent of:
const s = initial
while (cont(s)) {
s = body(s)
}
return s
Signature
declare const iterate: <Z, E, R>(initial: Z, options: { readonly while: Predicate<Z>; readonly body: (z: Z) => STM<Z, E, R>; }) => STM<Z, E, R>
Since v2.0.0