/** * 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 serviceWith */ export function serviceWith(tag: Tag, f: (a: T) => A): STM { return STM.serviceWithSTM(tag)((a) => STM.sync(f(a))) }