import { Collection } from "https://deno.land/x/revoltio@v1.0.0/deps.ts";
Partitions the collection into two collections where the first collection contains the items that passed and the second contains the items that failed.
Examples
const [big, small] = collection.partition(guild => guild.memberCount > 250);
const [big, small] = collection.partition(guild => guild.memberCount > 250);
Parameters
fn: () => key is K2
value: V,
key: K,
collection: this,
Function used to test (should return a boolean)
Returns
[Collection<K2, V>, Collection<Exclude<K, K2>, V>]
Parameters
fn: () => value is V2
value: V,
key: K,
collection: this,
Returns
[Collection<K, V2>, Collection<K, Exclude<V, V2>>]
Returns
[Collection<K, V>, Collection<K, V>]