6 Aug
2004
6 Aug
'04
12:05 p.m.
Oops. Lest anybody should copy it blindly: mkpgm :: Array (Int,Int) Int -> String mkpgm cm = header ++ "\n" ++ image where header = unwords ["P2",show width,show heigth,show maxval] image = unlines $ map show $ elems cm - (width,heigth) = snd $ bounds cm + (heigth,width) = snd $ bounds cm maxval = maximum (elems cm) -kzm -- If I haven't seen further, it is by standing in the footprints of giants