Yes, of course. How blind of me. Here is one more question.
If you change IOUArray to IOArray and add $! in front of the two summations in the previous code, it still works correctly.
But can you do similar trick with Array and accumArray? I have tried to put $! in different places in the first code that I posted but nothing seems to work.
Maybe an (UArray (Int,Int) Double) could help, where the second index range is fixed to (0,2).
On Fri, 16 May 2008, Lauri Oksanen wrote:
Thanks for help. I did some tests with UArray and it does the trick.
The problem remaining is, how to implement UArray Int (Double, Double, Double)?