/** * Returns a new schedule that folds over the outputs of this one. * * @tsplus static effect/core/io/Schedule.Aspects fold * @tsplus pipeable effect/core/io/Schedule fold */ export function fold(z: Z, f: (z: Z, out: Out) => Z) { return ( self: Schedule ): Schedule => self.foldEffect(z, (z, out) => Effect.sync(f(z, out))) }