Safe Haskell | Safe-Inferred |
---|---|
Language | Haskell2010 |
Distribution.Compat.NonEmptySet
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 #
Since: Cabal-3.4.0.0
Instances
Construction
singleton :: a -> NonEmptySet a #
Insertion
insert :: Ord a => a -> NonEmptySet a -> NonEmptySet a #
Deletion
delete :: Ord a => a -> NonEmptySet a -> Maybe (NonEmptySet a) #
Conversions
toNonEmpty :: NonEmptySet a -> NonEmpty a #
fromNonEmpty :: Ord a => NonEmpty a -> NonEmptySet a #
toList :: NonEmptySet a -> [a] #
toSet :: NonEmptySet a -> Set a #
Query
member :: Ord a => a -> NonEmptySet a -> Bool #
Map
map :: Ord b => (a -> b) -> NonEmptySet a -> NonEmptySet b #