Hyperlinkv0.8.0-beta.28

HashSet

HashSet.isSubsetconsteffect/HashSet.ts:449
<V1>(that: HashSet<V1>): <V0>(self: HashSet<V0>) => boolean
<V0, V1>(self: HashSet<V0>, that: HashSet<V1>): boolean

Checks whether a HashSet is a subset of another HashSet.

Example (Checking subset relationships)

import { HashSet } from "effect"

const small = HashSet.make("a", "b")
const large = HashSet.make("a", "b", "c", "d")
const other = HashSet.make("x", "y")

console.log(HashSet.isSubset(small, large)) // true
console.log(HashSet.isSubset(large, small)) // false
console.log(HashSet.isSubset(small, other)) // false
console.log(HashSet.isSubset(small, small)) // true
elements
Source effect/HashSet.ts:4497 lines
export const isSubset: {
  <V1>(that: HashSet<V1>): <V0>(self: HashSet<V0>) => boolean
  <V0, V1>(self: HashSet<V0>, that: HashSet<V1>): boolean
} = Dual.dual<
  <V1>(that: HashSet<V1>) => <V0>(self: HashSet<V0>) => boolean,
  <V0, V1>(self: HashSet<V0>, that: HashSet<V1>) => boolean
>(2, internal.isSubset)
Referenced by 1 symbols