Hi there! Are you looking for the official Deno documentation? Try docs.deno.com for all your Deno learning needs.

dual

import { dual } from "https://raw.githubusercontent.com/baetheus/fun/main/initializable.ts";

Create a dual Initializable from an existing initializable. This effectively switches the order of application of the original Initializable.

@example
import { dual, getCombineAll, intercalcate } from "./initializable.ts";
import { InitializableString } from "./string.ts";
import { pipe } from "./fn.ts";

const reverse = dual(InitializableString);
const reverseAll = pipe(
  reverse,
  intercalcate(" "),
  getCombineAll,
);

const result = reverseAll("Hello", "World"); // "World Hello"
function dual<A>(M: Initializable<A>): Initializable<A>;
§

§Type Parameters

§Parameters