Skip to content

Instantly share code, notes, and snippets.

@ldunn
Created September 21, 2010 00:37
Show Gist options
  • Select an option

  • Save ldunn/588943 to your computer and use it in GitHub Desktop.

Select an option

Save ldunn/588943 to your computer and use it in GitHub Desktop.
let gridArray =
let arr = (Array2D.init 20 20 (fun i j -> 0))
for i in [0..(grid.Split '\n').Length-1] do
for j in [0..((grid.Split '\n').[0].Split ' ').Length-1] do
arr.[i,j] <- int ((grid.Split '\n').[i].Split ' ').[j]
arr
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment