[Haskell] question : updating an array

mt mtvo at info.fundp.ac.be
Tue Jun 7 15:43:57 EDT 2005

hi everybody,
(it's my first post...)

here is my problem:
say i have a list of values [Values], for each of them, i need to update an 
array. if each value corresponds to just one cell of the array i could have 
done something like this :

> myValues = [1..100]
> myArray = values

but for each value, i want to update more than just one cell.
for example, the '1' could map to cell1, cell2 and cell3 of the array and
the '2' could map to cell2, cell3 and cell4.

my question is : how can i represent the array in haskell to do what i've 
described? i've a lot of values and each one maps to quite a lot of cells.
the array will only be updated (a lot of time) then written to disk.
(practicaly, each value is a sample position in the R² plane and the result of
f :: Value -> Result is spread across many pixels of an image... so f can be 
understood as a functional image.)

thanks a lot, bye,
minh thu

More information about the Haskell mailing list