Hyperlinkv0.8.0-beta.28

HashMap

HashMap.removeManyconsteffect/HashMap.ts:961
<K>(keys: Iterable<K>): <V>(self: HashMap<K, V>) => HashMap<K, V>
<K, V>(self: HashMap<K, V>, keys: Iterable<K>): HashMap<K, V>

Removes all entries in the HashMap which have the specified keys.

Example (Removing multiple keys)

import { HashMap } from "effect"

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

console.log(HashMap.size(map2)) // 2
console.log(HashMap.has(map2, "a")) // true
console.log(HashMap.has(map2, "c")) // true
transforming
Source effect/HashMap.ts:9614 lines
export const removeMany: {
  <K>(keys: Iterable<K>): <V>(self: HashMap<K, V>) => HashMap<K, V>
  <K, V>(self: HashMap<K, V>, keys: Iterable<K>): HashMap<K, V>
} = internal.removeMany
Referenced by 1 symbols