Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- maxValue :: Map String Integer -> String
- maxValue m
- | null m = ""
- | otherwise = name
- where (name, _) = Map.foldrWithKey step first m
- step k v (mk, mv) = if v > mv then (k, v) else (mk, mv)
- first = head $ Map.toList m
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement