Is there a better code that does not need to transform the sequence into a list ?
let rec addentry map keys =
match keys with
| ((i,j) :: tail) -> Map.add (i,j) ((inputd.[i]).[j]) (addentry map tail)
| ([]) -> map
addentry Map.empty (Cartesian keys1 keys2 |> Seq.toList)