Safe Haskell | None |
---|---|
Language | Haskell2010 |
Synopsis
- data NonEmptySet a
- singleton :: a -> NonEmptySet a
- insert :: Ord a => a -> NonEmptySet a -> NonEmptySet a
- delete :: Ord a => a -> NonEmptySet a -> Maybe (NonEmptySet a)
- toNonEmpty :: NonEmptySet a -> NonEmpty a
- fromNonEmpty :: Ord a => NonEmpty a -> NonEmptySet a
- toList :: NonEmptySet a -> [a]
- toSet :: NonEmptySet a -> Set a
- member :: Ord a => a -> NonEmptySet a -> Bool
- map :: Ord b => (a -> b) -> NonEmptySet a -> NonEmptySet b
Documentation
data NonEmptySet a Source #
Since: 3.4.0.0
Instances
Construction
singleton :: a -> NonEmptySet a Source #
Insertion
insert :: Ord a => a -> NonEmptySet a -> NonEmptySet a Source #
Deletion
delete :: Ord a => a -> NonEmptySet a -> Maybe (NonEmptySet a) Source #
Conversions
toNonEmpty :: NonEmptySet a -> NonEmpty a Source #
fromNonEmpty :: Ord a => NonEmpty a -> NonEmptySet a Source #
toList :: NonEmptySet a -> [a] Source #
toSet :: NonEmptySet a -> Set a Source #
Query
Map
map :: Ord b => (a -> b) -> NonEmptySet a -> NonEmptySet b Source #