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