/** * Replicates the given effect `n` times. * * @tsplus static effect/core/stm/STM.Ops replicate */ export function replicate(n: number, stm: STM): Chunk> { return Chunk.range(0, n - 1).map(() => stm) } /** * Replicates the given effect `n` times. * * @tsplus static effect/core/stm/STM.Aspects replicate * @tsplus pipeable effect/core/stm/STM replicate */ export function replicateNow(n: number) { return (self: STM): Chunk> => replicate(n, self) }