[Haskell-cafe] Writing a pnm file

Sebastian Sylvan sebastian.sylvan at gmail.com
Mon Aug 3 16:19:21 EDT 2009

On Mon, Aug 3, 2009 at 11:17 AM, CK Kashyap <ck_kashyap at yahoo.com> wrote:

> Thanks Sebastian,
> Array/accumArray sounds like what I am looking for.
> Int -> ( a -> a ) -> [a] -> [a]
> approach, would it not be expensive on memory as well? Or is it just speed?

Well memory will be garbage collected fairly quickly so I don' think that's
an issue, other than the effects on speed that the extra allocations would
have. It's probably mainly speed because each pixel would have time
complexity O(n+m) rather than O(1) for an n*m image...

Sebastian Sylvan
UIN: 44640862
-------------- next part --------------
An HTML attachment was scrubbed...
URL: http://www.haskell.org/pipermail/haskell-cafe/attachments/20090803/6d4475da/attachment.html

More information about the Haskell-Cafe mailing list