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

Language | Haskell2010 |

- data IntMultimap a
- empty :: IntMultimap a
- singleton :: Hashable a => Int -> a -> IntMultimap a
- toList :: IntMultimap a -> [(Int, a)]
- fromList :: (Eq a, Hashable a) => [(Int, a)] -> IntMultimap a
- map :: (Eq b, Hashable b) => (a -> b) -> IntMultimap a -> IntMultimap b
- foldlWithKey' :: (Int -> a -> b -> a) -> a -> IntMultimap b -> a
- null :: IntMultimap a -> Bool
- size :: IntMultimap a -> Int
- member :: Int -> IntMultimap a -> Bool
- delete :: (Hashable a, Eq a) => Int -> a -> IntMultimap a -> IntMultimap a
- insert :: (Hashable a, Eq a) => Int -> a -> IntMultimap a -> IntMultimap a
- elems :: IntMultimap a -> [a]
- keys :: IntMultimap a -> [Int]
- split :: Int -> IntMultimap a -> (IntMultimap a, IntMultimap a)
- splitLookup :: Int -> IntMultimap a -> (IntMultimap a, Maybe (HashSet a), IntMultimap a)

# Documentation

data IntMultimap a Source #

A multi map of integers to values a.

Foldable IntMultimap Source # | |

(Eq a, Hashable a) => IsList (IntMultimap a) Source # | |

Eq a => Eq (IntMultimap a) Source # | |

Show a => Show (IntMultimap a) Source # | |

Generic (IntMultimap a) Source # | |

type Rep (IntMultimap a) Source # | |

type Item (IntMultimap a) Source # | |

# Construction

empty :: IntMultimap a Source #

singleton :: Hashable a => Int -> a -> IntMultimap a Source #

# List

toList :: IntMultimap a -> [(Int, a)] Source #

# Transformations

map :: (Eq b, Hashable b) => (a -> b) -> IntMultimap a -> IntMultimap b Source #

# Folds

foldlWithKey' :: (Int -> a -> b -> a) -> a -> IntMultimap b -> a Source #

# Basic interface

null :: IntMultimap a -> Bool Source #

size :: IntMultimap a -> Int Source #

:: (Hashable a, Eq a) | |

=> Int | Key |

-> a | |

-> IntMultimap a | |

-> IntMultimap a |

insert :: (Hashable a, Eq a) => Int -> a -> IntMultimap a -> IntMultimap a Source #

# Conversions

elems :: IntMultimap a -> [a] Source #

keys :: IntMultimap a -> [Int] Source #

# Filter

split :: Int -> IntMultimap a -> (IntMultimap a, IntMultimap a) Source #

splitLookup :: Int -> IntMultimap a -> (IntMultimap a, Maybe (HashSet a), IntMultimap a) Source #