4 ms·
dict.TryGetValue is an odd example here -- idiomatic F# for a map lookup would be: let value = defaultArg (Map.tryFind "foo" dict) "default" or match
by timrobinson 16y ago
dict.TryGetValue is an odd example here -- idiomatic F# for a map lookup would be:
let value = defaultArg (Map.tryFind "foo" dict) "default"
or
match Map.tryFind "foo" dict with
| Some v -> v
| None -> "default"
- masklinn 16y ago> dict.TryGetValue is an odd example here I sure as hell hope so, but that's what fleitz used.