Are you looking for something like this?

1
2
3
4
let init2flat h w f = Array2.init h w (fun y x -> f (y * w + x)) 

let arr2 = init2flat 3 3 (fun i -> i * i)
By on 12/5/2008 3:25 PM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper