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
_______________________________________________
Haskell mailing list
[EMAIL PROTECTED]
http://www.haskell.org/mailman/listinfo/haskell