Hi all,<br>Here is an interesting bit of information Impromptu users may find usefull:<br><br>Persistance while using vectors works a bit differently.<br>Normally, the let instantiates a new local variable for each call.<br><br>(define countvar<br>&nbsp;&nbsp; (lambda (val)<br>&nbsp;&nbsp; (let ((v 1))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (+ val v)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; )))<br>(countvar 3) -&gt; 4, every time<br><br><br>If the variable is a vector, successive calls perform successive <br>operations on the variable instansiated by let when the function is defined.<br><br>(define inccvctr<br>&nbsp;&nbsp; (lambda (vc)<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (let ( (v #(1 0 0 0 0 0 0 0 0 0 0 0 0 0 0 0)))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (math:vector-rotate v (- 0 vc))<br>&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp;&nbsp; (print v) )))<br><br>(inccvctr 1)-&gt;<br><br>#(0 1 0 0 0 0 0 0 0 0 0 0 0 0 0 0)<br>#(0 0 1 0 0 0 0 0 0 0 0 0 0 0 0 0)<br>#(0 0 0 1 0 0 0 0 0 0 0 0 0 0 0 0)<br>#(0 0 0 0 1 0 0 0 0 0 0 0 0 0 0 0)<br>#(0 0 0 0 0 1 0 0 0 0 0 0 0 0 0 0)<br>#(0 0 0 0 0 0 1 0 0 0 0 0 0 0 0 0)<br><br>cheers,<br>Dave<br><br>
<div>

</div>
<BR>

-- 
<div> Be Yourself @ mail.com!<br>
Choose From 200+ Email Addresses<br>
Get a <b>Free</b> Account at <a href="http://www.mail.com/Product.aspx" target="_blank">www.mail.com</a>!</div>