I am trying to merge two Maps, but there is no built in method for joining Collections. So how do you do it?
I am trying to merge two Maps, but there is no built in method for joining Collections. So how do you do it?
If you prefer using function composition you could define a join function like this:
let join (m1:Map<'a,'b>) (m2:Map<'a,'b>) =
Map.foldBack Map.add m2 m1
Given that m1 and m2 are Maps you would then use it like this:
m3 = join m1 m2
Some caveats:
m2 will overwrite those in m1