Package: effect
Module: HashSet
Adds a value to the HashSet.
Time complexity: O(1) average
Example
// Syntax
import { HashSet, pipe } from "effect"
// with data-last, a.k.a. pipeable API
pipe(HashSet.empty(), HashSet.add(0), HashSet.add(0))
// or piped with the pipe function
HashSet.empty().pipe(HashSet.add(0))
// or with data-first API
HashSet.add(HashSet.empty(), 0)
See
HashSet mutations are module:HashSet.remove module:HashSet.toggle module:HashSet.beginMutation module:HashSet.endMutation module:HashSet.mutateSignature
declare const add: { <A>(value: A): (self: HashSet<A>) => HashSet<A>; <A>(self: HashSet<A>, value: A): HashSet<A>; }
Since v2.0.0