[Haskell-cafe] Implementing and indexing 2 dimen arrays

Glynn Clements glynn.clements at virgin.net
Thu Mar 25 20:51:57 EST 2004

Alex Gontcharov wrote:

> I am writing a function, It's my first Haskell program
> in output function
> I will be working on [[3,4],[1,2,3,2],[3,9,9,4],[8,3,3,4] type
> structures
> I'd like to know how to index a particular element at run-time
> as I don't know on which element of which sublist I am at the moment
> in pullHelper function which starts with values !! ind p xs !! 

Note that Haskell has arrays as well as lists. Arrays may be better
suited to your problem.

Glynn Clements <glynn.clements at virgin.net>

More information about the Haskell-Cafe mailing list