import { type array } from "https://deno.land/x/fun@v2.0.0/mod.ts";
const { array } = array;
Specifies ReadonlyArray as a Higher Kinded Type, with covariant parameter A corresponding to the 0th index of any substitutions.
import { type array } from "https://deno.land/x/fun@v2.0.0/mod.ts";
const { array } = array;
This type can be used as a placeholder for an array of any type.
import { array } from "https://deno.land/x/fun@v2.0.0/mod.ts";
const { array } = array;
import { array } from "https://deno.land/x/fun@v2.0.0/mod.ts";
const { array } = array;
Create a NonEmptyArray from a variadic number of arguments.
Parameters
...a: NonEmptyArray<A>
Given a Predicate or Refinement, apply the predicate or refinement to every value in an array, removing (and refining) the elements that the predicate or refinement return false for.
Type Parameters
B extends A
Parameters
predicate: (a: A, index: number) => boolean
Partition a ReadonlyArray into two ReadonlyArrays using a predicate or refinement to do the sorting. If the predicate or refinement returns true for a value, the value is pushed into the first array in a Pair, otherwise it is pushed into the second array in a pair.
Type Parameters
B extends A
Parameters
predicate: (a: A, index: number) => boolean