
17 Apr
2007
17 Apr
'07
7:06 a.m.
ajb@spamcop.net wrote:
OK, it's not pretty, but this is diff(1) in 120 lines:
(Btw, pairs (Int,Int) are members of the Ix class as well, so there is no need to generate an array of arrays. You can just pretend that one array is indexed by pair of Ints table = array ((0,0),(lxs-1,lys-1)) [((i,j), cell i j x y) | (i,x) <- zip [0..] xs, (j,y) <- zip [0..] ys] ) Regards, apfelmus