<div>> That code doesn't work properly in parenscript, btw. It does not decrement.</div><div><br></div><div>PS's LOOP works just like CL's in this respect, so what Boris meant to</div><div>say was :DOWNTO rather than :TO. There are four options here. :TO and</div>
<div>:DOWNTO are inclusive, while :BELOW and :ABOVE are exclusive:</div><div><br></div><div> (loop :for num :from 1 :to 10 :collect num)</div><div> => (1 2 3 4 5 6 7 8 9 10)</div><div> </div><div> (loop :for num :from 10 :downto 1 :collect num)</div>
<div> => (10 9 8 7 6 5 4 3 2 1)</div><div><br></div><div> (loop :for num :from 1 :below 10 :collect num)</div><div> => (1 2 3 4 5 6 7 8 9)</div><div><br></div><div> (loop :for num :from 10 :above 1 :collect num)</div>
<div> => (10 9 8 7 6 5 4 3 2)</div><div><br></div><div>Daniel</div><div><br></div><br><div class="gmail_quote">On Tue, Jan 15, 2013 at 1:18 PM, David Sargeant <span dir="ltr"><<a href="mailto:david@dsargeant.com" target="_blank">david@dsargeant.com</a>></span> wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">That code doesn't work properly in parenscript, btw. It does not decrement.<br>
<br>
(function () {<br>
var collect66 = [];<br>
for (var num = 10; num <= 1; num += 1) {<br>
collect66['push'](num);<br>
};<br>
return collect66;<br>
})();<br>
<div class="HOEnZb"><div class="h5"><br>
_______________________________________________<br>
parenscript-devel mailing list<br>
<a href="mailto:parenscript-devel@common-lisp.net">parenscript-devel@common-lisp.net</a><br>
<a href="http://lists.common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel" target="_blank">http://lists.common-lisp.net/cgi-bin/mailman/listinfo/parenscript-devel</a><br>
</div></div></blockquote></div><br>