import * as tsplus_module_1 from "@effect/core/stm/STM/operations/whenCase";
import * as tsplus_module_2 from "@effect/core/stm/STM/operations/flatMap";
import * as tsplus_module_3 from "@effect/core/stm/STM/operations/suspend";
/**
 * Runs an effect when the supplied partial function matches for the given
 * value, otherwise does nothing.
 *
 * @tsplus static ets/STM/Ops whenCaseSTM
 */

export function whenCaseSTM(a, pf, __tsplusTrace) {
  return tsplus_module_3.suspend(() => tsplus_module_2.flatMap_(a(), a => tsplus_module_1.whenCase(() => a, pf, __tsplusTrace)));
}
//# sourceMappingURL=whenCaseSTM.mjs.map