Skip to content

Instantly share code, notes, and snippets.

@jroesch
Last active August 29, 2015 14:00
Show Gist options
  • Select an option

  • Save jroesch/11060516 to your computer and use it in GitHub Desktop.

Select an option

Save jroesch/11060516 to your computer and use it in GitHub Desktop.
type DDict v = Dict String (Dict String v)
nested : DDict v
nested = ...
-- Let's assume we want to update all inner fields
updateInner :: String -> v -> DDict v -> DDict v
updateInner s v d = Dict.fromList $ (keys d) (map (Dict.insert s v) $ values d)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment