import type * as P from "@principia/prelude"; import * as HKT from "@principia/prelude/HKT"; import { Functor } from "./functor"; import type { EIO, URI, V } from "./model"; import { chain_ } from "./monad"; /* * ------------------------------------------- * Alt EIO * ------------------------------------------- */ export const alt_ = (fa: EIO, that: () => EIO): EIO => chain_(fa, that); export const alt = (that: () => EIO) => (fa: EIO): EIO => alt_(fa, that); /** * @category Alt * @since 1.0.0 */ export const Alt: P.Alt<[URI], V> = HKT.instance({ ...Functor, alt_, alt });