/** * STMfully accesses the specified service in the environment of the * effect. * * Especially useful for creating "accessor" methods on services' companion * objects. * * @tsplus static effect/core/stm/STM.Ops serviceWithSTM */ export function serviceWithSTM(tag: Tag) { return (f: (a: T) => STM): STM => STM.service(tag).flatMap(f) }