Advertisement
Guest User

Untitled

a guest
May 7th, 2014
134
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
  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] // 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
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement