| Safe Haskell | None |
|---|---|
| Language | Haskell2010 |
Data.Set.NonEmpty
Synopsis
- data NonEmptySet a
- fromFoldable ∷ (Foldable f, Ord a) ⇒ f a → Maybe (NonEmptySet a)
- fromSet ∷ Set a → Maybe (NonEmptySet a)
- singleton ∷ a → NonEmptySet a
- toList ∷ NonEmptySet a → [a]
- toSet ∷ NonEmptySet a → Set a
Documentation
data NonEmptySet a Source #
Instances
fromFoldable ∷ (Foldable f, Ord a) ⇒ f a → Maybe (NonEmptySet a) Source #
\(O(n \log n)\).
singleton ∷ a → NonEmptySet a Source #
\(O(1)\).
toList ∷ NonEmptySet a → [a] Source #
\(O(n)\).
toSet ∷ NonEmptySet a → Set a Source #
\(O(1)\).