<html><head></head><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; "><div>The point of the array function is just that it lets you initialize the elements of the array in any order you want rather than sequentially; &nbsp;that's why you need to specify the index as well as the element. &nbsp;It isn't indicating that the indices are being stored in addition to the elements.</div><div><div><br></div><div>Cheers,</div><div>Greg</div><div><br></div><div>On Dec 16, 2009, at 7:54 PM, michael rice wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"><table cellspacing="0" cellpadding="0" border="0"><tbody><tr><td valign="top" style="font: inherit;"><a href="http://www.zvon.org/other/haskell/Outputarray/array_f.html">http://www.zvon.org/other/haskell/Outputarray/array_f.html</a><br><br><br>Example 7 (and others)<br><br>Input: array ('a','c') [('a',"AAA"),('b',"BBB"),('c',"CCC")] ! 'b'<br><br>Output: "BBB"<br><br><br>Maybe it's just the notation that makes it LOOK like the indices are also getting stored?<br><br>Michael<br><br><br>--- On <b>Wed, 12/16/09, Daniel Peebles <i>&lt;pumpkingod@gmail.com&gt;</i></b> wrote:<br><blockquote style="border-left: 2px solid rgb(16, 16, 255); margin-left: 5px; padding-left: 5px;"><br>From: Daniel Peebles &lt;pumpkingod@gmail.com&gt;<br>Subject: Re: [Haskell-cafe] Haskell arrays<br>To: "michael rice" &lt;nowgate@yahoo.com&gt;<br>Cc: haskell-cafe@haskell.org<br>Date: Wednesday, December 16, 2009, 10:46 PM<br><br><div id="yiv434555262">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?<br><br><div class="gmail_quote">On Wed, Dec 16, 2009 at 10:38 PM, michael rice <span dir="ltr">&lt;<a rel="nofollow" ymailto="mailto:nowgate@yahoo.com" target="_blank" href="x-msg://1250/mc/compose?to=nowgate@yahoo.com">nowgate@yahoo.com</a>&gt;</span> wrote:<br>
<blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;"><table border="0" cellpadding="0" cellspacing="0"><tbody><tr><td style="font-family: inherit; font-style: inherit; font-variant: inherit; font-weight: inherit; font-size: inherit; line-height: inherit; font-size-adjust: inherit; font-stretch: inherit; -x-system-font: none;" valign="top">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.<br>
<br>Is it true?<br><br>Michael<br></td></tr></tbody></table><br>

      <br>_______________________________________________<br>
Haskell-Cafe mailing list<br>
<a rel="nofollow" ymailto="mailto:Haskell-Cafe@haskell.org" target="_blank" href="x-msg://1250/mc/compose?to=Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>
<a rel="nofollow" target="_blank" href="http://www.haskell.org/mailman/listinfo/haskell-cafe">http://www.haskell.org/mailman/listinfo/haskell-cafe</a><br>
<br></blockquote></div><br>
</div></blockquote></td></tr></tbody></table><br>

      _______________________________________________<br>Haskell-Cafe mailing list<br><a href="mailto:Haskell-Cafe@haskell.org">Haskell-Cafe@haskell.org</a><br>http://www.haskell.org/mailman/listinfo/haskell-cafe<br></blockquote></div><br></body></html>