/** * Runs an effect when the supplied partial function matches for the given * value, otherwise does nothing. * * @tsplus static effect/core/stm/STM.Ops whenCaseSTM */ export function whenCaseSTM( stm: STM, pf: (a: A) => Maybe> ): STM> { return stm.flatMap((a) => STM.whenCase(a, pf)) }