import { tuple } from "../Function"; import { mapBoth_ } from "./apply"; import { succeed } from "./constructors"; import type { XPure } from "./model"; /* * ------------------------------------------- * Applicative XPure * ------------------------------------------- */ export const pure = (a: A): XPure => succeed(a); export const both_ = ( fa: XPure, fb: XPure ): XPure => mapBoth_(fa, fb, tuple); export const both = (fb: XPure) => ( fa: XPure ): XPure => both_(fa, fb);