让字典可变: let dict = Dict.fromList [("key1", "value1"), ("key2", "value2")]
要插入元素: let dict' = Dict.insert "key3" "value3" dict
要查找元素:
case Dict.get "key1" dict of
Just value -> ... -- do something with value
Nothing -> ... -- no such value in dict
Dict.lookup
现在似乎被称为 Dict.get
。http://package.elm-lang.org/packages/elm-lang/core/latest/Dict - Name McChange