import { initializable } from "https://deno.land/x/fun@v2.0.0/mod.ts";
const { dual } = initializable;
Create a dual Initializable from an existing initializable. This effectively switches the order of application of the original Initializable.
Examples
Example 1
Example 1
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"