[Haskell-cafe] How to devide matrix into small blocks

Henning Thielemann lemming at henning-thielemann.de
Thu Jun 14 08:05:14 EDT 2007


On Thu, 14 Jun 2007, L.Guo wrote:

> About the data.
>
> The whole image is of type [[a]], and after being devided, it is also [[a]].

I would store an image in an (Array (Int,Int)). This is not only more
efficient, but also ensures statically that the image data is rectangular.
I assume that you do not need infinite images. They can be represented by
lists but not by arrays.


More information about the Haskell-Cafe mailing list