Module

# Data.Set

- Package
- purescript-ordered-collections
- Repository
- purescript/purescript-ordered-collections

This module defines a type of sets as balanced 2-3 trees, based on http://www.cs.princeton.edu/~dpw/courses/cos326-12/ass/2-3-trees.pdf

Qualified import is encouraged, so as to avoid name clashes with other modules.

### #fromFoldable Source

`fromFoldable :: forall f a. Foldable f => Ord a => f a -> Set a`

Create a set from a foldable structure.

### #toUnfoldable Source

`toUnfoldable :: forall f a. Unfoldable f => Set a -> f a`

Convert a set to an unfoldable structure.

### #checkValid Source

`checkValid :: forall a. Set a -> Boolean`

Check whether the underlying tree satisfies the 2-3 invariant

This function is provided for internal use.

### #properSubset Source

`properSubset :: forall a. Ord a => Set a -> Set a -> Boolean`

True if and only if the first set is a subset of the second set and the sets are not equal

### #intersection Source

`intersection :: forall a. Ord a => Set a -> Set a -> Set a`

The set of elements which are in both the first and second set