import * as X from "../XPure"; import type { Sync } from "./model"; /* * ------------------------------------------- * Sync Combinators * ------------------------------------------- */ export const foldM_: ( fa: Sync, onFailure: (e: E) => Sync, onSuccess: (a: A) => Sync ) => Sync = X.foldM_; export const foldM: ( onFailure: (e: E) => Sync, onSuccess: (a: A) => Sync ) => (fa: Sync) => Sync = X.foldM; export const fold_: ( fa: Sync, onFailure: (e: E) => B, onSuccess: (a: A) => C ) => Sync = X.fold_; export const fold: ( onFailure: (e: E) => B, onSuccess: (a: A) => C ) => (fa: Sync) => Sync = X.fold; export const catchAll_: ( fa: Sync, onFailure: (e: E) => Sync ) => Sync = X.catchAll_; export const catchAll: ( onFailure: (e: E) => Sync ) => (fa: Sync) => Sync = X.catchAll;