Applies the function to transform the continuation passed to the computation.
import { assertEquals } from "../deps.ts";import { runCont, withCont } from "./cont.ts";const cont = withCont((fn: (x: number) => boolean) => (a: string) => fn(parseInt(a, 10)))( (callback) => callback("foo"),);const actual = runCont(cont)(Number.isNaN);assertEquals(actual, true); Copy
import { assertEquals } from "../deps.ts";import { runCont, withCont } from "./cont.ts";const cont = withCont((fn: (x: number) => boolean) => (a: string) => fn(parseInt(a, 10)))( (callback) => callback("foo"),);const actual = runCont(cont)(Number.isNaN);assertEquals(actual, true);
Generated using TypeDoc
Applies the function to transform the continuation passed to the computation.
Examples