Skip to main content
Module

x/fun/promise.ts>then

A collection of algebraic data types, lenses, and schemables based on a light weight higher kinded type implementation. Written for deno.
Go to Latest
function then
import { then } from "https://deno.land/x/fun@v2.0.0-alpha.6/promise.ts";

An alias for Promise.then

Examples

Example 1

import { of, then } from "./promise.ts";
import { pipe } from "./fn.ts";

const result = await pipe(
  of(1),
  then(n => n + 1),
); // 2

Parameters

fai: (a: A) => I | Promise<I>

Returns

(ua: Promise<A>) => Promise<I>