| hoogle | Source code | Contents | Index

Data.Key

Synopsis

data Key k v
keyPair :: k -> v -> Key k v
toKey :: (v -> k) -> v -> Key k v
fromKey :: Key k v -> v
sortKeys :: Ord k => [Key k v] -> [v]
sortWith :: Ord k => (v -> k) -> [v] -> [v]

Documentation

data Key k v | Source

Instances

Eq k => Eq (Key k v)
Ord k => Ord (Key k v)

keyPair :: k -> v -> Key k v | Source

toKey :: (v -> k) -> v -> Key k v | Source

fromKey :: Key k v -> v | Source

sortKeys :: Ord k => [Key k v] -> [v] | Source

sortWith :: Ord k => (v -> k) -> [v] -> [v] | Source

`sort f == sortBy (compare `on` f)` but `f` will only be applied to each element once
Produced by Haddock version 2.4.2