Hi all:

I already have one matrix of type [[a]] to store one image.

What I want to do is to devide the image into severial small blocks in same 
size.

To do that, I wrote this tool function.

chop      :: Int -> [a] -> [[a]]
chop _ [] = []
chop n ls = take n ls : chop n (drop n ls)

But I do not know how to use it to write the function.

Thanks for any advice.

    Regards
--------------
L.Guo
2007-06-13

_______________________________________________
Haskell-Cafe mailing list
[email protected]
http://www.haskell.org/mailman/listinfo/haskell-cafe

Reply via email to