Something went wrong. Try again.
A music player that connects to your cloud/distributed storage. forked from tokono.ma/diffuse
Something went wrong. Try again.
12345678910111213141516171819202122232425module Dict.Ext exposing (fetch, fetchUnknown, unionFlipped)
import Dict exposing (Dict)
-- 🔱
unionFlipped : Dict comparable v -> Dict comparable v -> Dict comparable vunionFlipped a b = Dict.union b a
fetch : comparable -> v -> Dict comparable v -> vfetch key default dict = dict |> Dict.get key |> Maybe.withDefault default
fetchUnknown : comparable -> Dict comparable String -> StringfetchUnknown key dict = fetch key "MISSING_VALUE" dict