/** * Merges an `Collection>` to a single `STM`, working * sequentially. * * @tsplus static effect/core/stm/STM.Ops mergeAll */ export function mergeAll( as: Collection>, zero: B, f: (b: B, a: A) => B ): STM { return STM.suspend(as.reduce(STM.succeed(zero) as STM, (acc, a) => acc.zipWith(a, f))) }