BTW, I know I can do this:

seq {for x in 0 .. image.Width - 1 do

for y in 0 .. image.Height - 1 do

yield (x,y) }

I'm wondering if there is something more terse (Like in the example I showed above).

By on 5/15/2010 7:55 PM ()

Mmh I don't know if u consider this elegant but...

let w = 200;

let h = 100;

let r1 = seq {0 .. w-1}

let r2 = seq {0 .. h-1}

let mate sequence value = Seq.map (fun v -> (value, v)) sequence

let rr = Seq.map (mate r1) r2

printfn "%A" rr

By on 5/17/2010 9:56 AM ()
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