import { array } from "https://deno.land/x/fun@v2.0.0/mod.ts";
const { getInitializableArray } = array;
Create an instance of Initializable<ReadonlyArray> given a type A. This instance uses array compose and default as the instance methods for the Initializable.
Examples
Example 1
Example 1
import * as A from "./array.ts";
import { pipe } from "./fn.ts";
const { init, combine } = A.getInitializableArray<number>();
const result = pipe(
init(), // []
combine([1, 2, 3]),
); // [1, 2, 3]