Module

x/rambda/index.d.ts>splitWhen

Faster and smaller alternative to Ramda
Latest
function splitWhen
import { splitWhen } from "https://dotland.deno.dev/x/rambda@9.4.1/index.d.ts";

It splits list to two arrays according to a predicate function.

The first array contains all members of list before predicate returns true.

Parameters

predicate: Predicate<T>
list: U[]

Returns

(U[])[]

Returns

<U>(list: U[]) => (U[])[]