import * as T from "../Task/_core"; import { bimapM_ } from "./bifunctor"; import type { XRefM } from "./model"; /** * Transforms the `set` value of the `XRefM` with the specified effectual * function. */ export const contramapM_ = ( self: XRefM, f: (c: C) => T.Task ): XRefM => bimapM_(self, f, T.pure); /** * Transforms the `set` value of the `XRefM` with the specified effectual * function. */ export const contramapM = (f: (c: C) => T.Task) => ( self: XRefM ): XRefM => contramapM_(self, f); /** * Transforms the `set` value of the `XRefM` with the specified function. */ export const contramap_ = ( self: XRefM, f: (c: C) => A ): XRefM => contramapM_(self, (c) => T.pure(f(c))); /** * Transforms the `set` value of the `XRefM` with the specified function. */ export const contramap = (f: (c: C) => A) => ( self: XRefM ): XRefM => contramap_(self, f);