Maintainer | Ziyang Liu <free@cofree.io> |
---|---|
Safe Haskell | Safe-Inferred |
Language | Haskell2010 |
Conversions between Multimap
and SetMultimap
.
Synopsis
- toMultimapAsc :: SetMultimap k a -> Multimap k a
- toMultimapDesc :: SetMultimap k a -> Multimap k a
- toSetMultimap :: Ord a => Multimap k a -> SetMultimap k a
Documentation
toMultimapAsc :: SetMultimap k a -> Multimap k a Source #
Convert a SetMultimap
to a Multimap
where the values of each key
are in ascending order.
toMultimapAsc (Data.Multimap.Set.fromList [(1,'a'),(1,'b'),(2,'c')]) === Data.Multimap.fromList [(1,'a'),(1,'b'),(2,'c')]
toMultimapDesc :: SetMultimap k a -> Multimap k a Source #
Convert a SetMultimap
to a Multimap
where the values of each key
are in descending order.
toMultimapDesc (Data.Multimap.Set.fromList [(1,'a'),(1,'b'),(2,'c')]) === Data.Multimap.fromList [(1,'b'),(1,'a'),(2,'c')]
toSetMultimap :: Ord a => Multimap k a -> SetMultimap k a Source #
Convert a Multimap
to a SetMultimap
.
toSetMultimap (Data.Multimap.fromList [(1,'a'),(1,'b'),(2,'c')]) === Data.Multimap.Set.fromList [(1,'a'),(1,'b'),(2,'c')]