module Utils.Dict exposing
  ( mapValues
  )

import Dict as Dict exposing (..)

mapValues : (a -> b) -> Dict comparable a -> Dict comparable b
mapValues f = Dict.fromList << List.map (onSecond f) << Dict.toList

onSecond : (a -> b) -> (comparable, a) -> (comparable, b)
onSecond f tuple = case tuple of (x, y) -> (x, f y)