View difference between Paste ID: fNr1NMje and CuSkHZC9
SHOW: | | - or go back to the newest paste.
1
let swap (arr : int[,]) i1 i2 =
2
    let map i j v =
3
        match (i,j) with
4-
        | t when t = i1 -> arr.[fst i2, snd i2]
4+
        | t when t = i1 -> arr.[fst i2, snd i2] // why are we declaring t? why cant we say just i1 when i1 true ....
5
        | u when u = i2 -> arr.[fst i1, snd i1]
6
        | _ -> v
7
    arr |> Array2D.mapi map