Augmentations for sets.

Remarks

Importing this module

This module's augmentations can be applied by using the following import:

import "@neotype/extensions/set.js";

Comparing sets

Sets implement Eq.

  • Two sets are equal if they are the same size and contain the same elements. Elements are compared strictly.
  • Read-only and non-read-only sets can be compared to each other.

Combining sets as a semigroup

Sets implement Semigroup.

  • Sets are combined by taking their union.
  • Read-only and non-read-only sets can be combined with each other.
  • If either set is read-only, the resulting set will also be read-only.

Index

Interfaces

Generated using TypeDoc