Safe Haskell | Safe |
---|---|

Language | Haskell98 |

Bidirectional maps (bijections)

- data BiMap a b = BiMap {
- _forwardMap :: !(Map a b)
- _backwardMap :: !(Map b a)

- empty :: (Ord a, Ord b) => BiMap a b
- toList :: (Ord a, Ord b) => BiMap a b -> [(a, b)]
- toListRev :: (Ord a, Ord b) => BiMap a b -> [(b, a)]
- fromList :: (Ord a, Ord b) => [(a, b)] -> BiMap a b
- lookup :: Ord a => a -> BiMap a b -> Maybe b
- lookupRev :: Ord b => b -> BiMap a b -> Maybe a
- insert :: (Ord a, Ord b) => a -> b -> BiMap a b -> BiMap a b
- delete :: (Ord a, Ord b) => a -> BiMap a b -> BiMap a b
- deleteRev :: (Ord a, Ord b) => b -> BiMap a b -> BiMap a b