Hello michael, Thursday, December 17, 2009, 6:54:24 AM, you wrote:
what is you see here is called "association list". *function* array takes an index range and assoclist and returns an array. notice that data constructors are started with capital letter, f.e. Array > http://www.zvon.org/other/haskell/Outputarray/array_f.html > Example 7 (and others) > Input: array ('a','c') [('a',"AAA"),('b',"BBB"),('c',"CCC")] ! 'b' > Output: "BBB" > Maybe it's just the notation that makes it LOOK like the indices are also > getting stored? > Michael > --- On Wed, 12/16/09, Daniel Peebles <pumpkin...@gmail.com> wrote: > From: Daniel Peebles <pumpkin...@gmail.com> > Subject: Re: [Haskell-cafe] Haskell arrays > To: "michael rice" <nowg...@yahoo.com> > Cc: haskell-cafe@haskell.org > Date: Wednesday, December 16, 2009, 10:46 PM > It doesn't store both, but does provides a flexible indexing > strategy (that allows indices to be non-trivial values). What docs suggest > that it stores both? > On Wed, Dec 16, 2009 at 10:38 PM, michael rice <nowg...@yahoo.com> wrote: > > Based upon docs I've looked at, Haskell seems to store both an > array element value AND its index/indices, whereas most languages > just store the value and find its location in memory through mapping > calculations. > > Is it true? > Michael > > _______________________________________________ > Haskell-Cafe mailing list > Haskell-Cafe@haskell.org > http://www.haskell.org/mailman/listinfo/haskell-cafe > > > -- Best regards, Bulat mailto:bulat.zigans...@gmail.com _______________________________________________ Haskell-Cafe mailing list Haskell-Cafe@haskell.org http://www.haskell.org/mailman/listinfo/haskell-cafe