Skip to main content
Module

x/fun/mod.ts>promise.then

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

An alias for Promise.then

Examples

Example 1

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

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

Parameters

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

Returns

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