is something like this an acceptable approach?&nbsp; (just teat a linear array like a 2d array).&nbsp; seems like a better version of this stuff is probably part of the included stuff, I would imagine.&nbsp; Like there&#39;s probably a way to get the size of a vector.&nbsp; I was going to make a (array-2d-print) function, too that displays it like a grid ..... maybe tomorrow.&nbsp; Any suggested improvements or directions are of course welcome.<br>
<br>(define (make-array-2d size initial)<br>&nbsp; (make-vector (* size size) initial)) <br><br>(define (array-2d-ref array size row col)<br>&nbsp; (vector-ref array (+ (* row size) col)))<br><br>(define (array-2d-set! array size row col value)<br>
&nbsp; (vector-set! array (+ (* row size) col)))<br><br>&gt; (define deposits (make-array-2d 17 0))<br><br>&gt; (array-2d-ref deposits 17 0 11)<br>0<br><br>&gt; (array-2d-set! deposits 17 0 11 39)<br><br>&gt; (array-2d-ref deposits 17 0 11)<br>

39<br><br><br><br><div class="gmail_quote">On Sat, Feb 14, 2009 at 4:40 PM, Chongkai Zhu <span dir="ltr">&lt;<a href="mailto:czhu@cs.utah.edu">czhu@cs.utah.edu</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;">
and every slot of the vector is filled with `fill&#39;. In your</blockquote></div><br>