Hyperlinkv0.8.0-beta.28

HashMap

HashMap.removeconsteffect/HashMap.ts:937
<K>(key: K): <V>(self: HashMap<K, V>) => HashMap<K, V>
<K, V>(self: HashMap<K, V>, key: K): HashMap<K, V>

Removes the entry for the specified key in the HashMap using the internal hashing function.

Example (Removing a key)

import { HashMap } from "effect"

const map1 = HashMap.make(["a", 1], ["b", 2], ["c", 3])
const map2 = HashMap.remove(map1, "b")

console.log(HashMap.size(map2)) // 2
console.log(HashMap.has(map2, "b")) // false
console.log(HashMap.has(map2, "a")) // true
transforming
Source effect/HashMap.ts:9374 lines
export const remove: {
  <K>(key: K): <V>(self: HashMap<K, V>) => HashMap<K, V>
  <K, V>(self: HashMap<K, V>, key: K): HashMap<K, V>
} = internal.remove
Referenced by 3 symbols