from array update algorithm to nice Haskell code

Derek Elkins ddarius at hotpop.com
Wed Dec 31 02:27:37 EST 2003


> On Tue, 30 Dec 2003 23:14:05 +0100, Wolfgang Jeltsch
> <wolfgang at jeltsch.net> wrote:

[replying indirectly because the original email doesn't seem to have
gotten here yet]

> > I have an algorithm which updates one or more arrays in a loop.  The
> > update operations depend on the (old) contents of the arrays, so I
> > cannot use accumArray.  I want to implement this algorithm without
> > mutable arrays in Haskell.  Are there any possibilities to do so
> > efficiently?  Are there some hints about how to do this?

You may want to look at DiffArrays
http://www.haskell.org/ghc/docs/latest/html/libraries/base/Data.Array.Diff.html



More information about the Haskell mailing list