import { chainLift } from "https://deno.land/x/functional@v1.3.4/mod.js";
chainLift
(a -> b -> c) -> Chainable a -> Functor b -> Chainable c
This function is similar to lift
but is chainable.
import Task from "https://deno.land/x/functional@v1.3.2/library/Task.js";
import { chainLift } from "https://deno.land/x/functional@v1.3.2/library/utilities.js";
const hogeFuga = useWith(
chainLift(curry((x, y) => Task.of(x * y))),
[
x => Task.of(x),
x => Task.of(x)
]
);
const container = await hogeFuga(42, 24).run();
const value = safeExtract("Failed.", container);
assertEquals(value, 1008);