[Haskell-cafe] Writing a pnm file
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...
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the Haskell-Cafe