Module

x/functional/mod.ts>runSequentially

Common Functional Programming Algebraic data types for JavaScript that is compatible with most modern browsers and Deno.
Latest
variable runSequentially
import { runSequentially } from "https://deno.land/x/functional@v1.3.4/mod.ts";

runSequentially

Chain c => (...c) -> c

This function takes n Chainable functor and chain them automatically.

import Task from "https://deno.land/x/functional@v1.3.2/library/Task.js";
import { runSequentially } from "https://deno.land/x/functional@v1.3.2/library/utilities.js";

const fuga = converge(
  runSequentially,
  [
    x => Task.of(x * 2),
    x => Task.of(x + 2)
  ]
);

const container = await fuga(42).run();

const value = safeExtract("Failed.", container);

assertEquals(value, 44);

type

(initialChainableFunctor, ...chainableFunctorList) => unknown