/** * Atomically performs transactional effect for each item in array. * * @tsplus static effect/core/stm/TArray.Aspects forEach * @tsplus pipeable effect/core/stm/TArray forEach */ export function forEach(f: (a: A) => STM) { return (self: TArray): STM => self.reduceSTM( undefined as void, (_, a) => f(a) ) }