RosettaCodeData/Task/Associative-array-Creation/F-Sharp/associative-array-creation-2.fs
2023-07-01 13:44:08 -04:00

7 lines
246 B
FSharp

let d = [("key","val");("other key","other val")] |> Map.ofList
let newd = d.Add("new key","new val")
let takeVal (d:Map<string,string>) =
match d.TryFind("key") with
| Some(v) -> printfn "%s" v
| None -> printfn "not found"