Package: effect
Module: MutableHashSet
Removes a value from the MutableHashSet.
Time complexity: O(1) average
Syntax
import { MutableHashSet, pipe } from "effect"
import assert from "node:assert/strict"
assert.equal(
// with `data-last`, a.k.a. `pipeable` API
pipe(
MutableHashSet.make(0, 1, 2),
MutableHashSet.remove(0),
MutableHashSet.has(0)
),
false
)
assert.equal(
// or piped with the pipe function
MutableHashSet.make(0, 1, 2).pipe(
MutableHashSet.remove(0),
MutableHashSet.has(0)
),
false
)
assert.equal(
// or with `data-first` API
MutableHashSet.remove(MutableHashSet.make(0, 1, 2), 0).pipe(
MutableHashSet.has(0)
),
false
)
See
MutableHashSet elements are module:MutableHashSet.add module:MutableHashSet.has module:MutableHashSet.size module:MutableHashSet.clearSignature
declare const remove: { <V>(key: V): (self: MutableHashSet<V>) => MutableHashSet<V>; <V>(self: MutableHashSet<V>, key: V): MutableHashSet<V>; }
Since v2.0.0