Skip to main content
Module

x/rimbu/collection-types/set-custom/index.ts>RSetBase

Rimbu is a TypeScript library focused on immutable, performant, and type-safe collections and other tools.
Go to Latest
namespace RSetBase
import { RSetBase } from "https://deno.land/x/rimbu@0.14.0/collection-types/set-custom/index.ts";

Interfaces

Utility interface that provides higher-kinded types for this collection.

interface RSetBase
implements VariantSetBase<T, Tp>
import { type RSetBase } from "https://deno.land/x/rimbu@0.14.0/collection-types/set-custom/index.ts";

Properties

readonly
context: WithElem<Tp, T>["context"]

Returns the context associated to this collection instance.

Methods

add(value: T): WithElem<Tp, T>["nonEmpty"]

Returns the collection with given value added.

addAll(values: StreamSource.NonEmpty<T>): WithElem<Tp, T>["nonEmpty"]

Returns the collection with the values in given values StreamSource added.

addAll(values: StreamSource<T>): WithElem<Tp, T>["normal"]
union(other: StreamSource.NonEmpty<T>): WithElem<Tp, T>["nonEmpty"]

Returns a collection containing all values from this collection and all values of given other StreamSource.

union(other: StreamSource<T>): WithElem<Tp, T>["normal"]
symDifference(other: StreamSource<T>): WithElem<Tp, T>["normal"]

Returns a collection of the values that are either in this collection or in the other StreamSource, but not in both.

toBuilder(): WithElem<Tp, T>["builder"]

Returns a builder object containing the values of this collection.