<div dir="ltr">Ok now this is making sense, for some reason Orm&#39;s message went to my spam bin. Sorry for the confusion. <div><br></div><div>Thanks Orm, I&#39;ll look through the various places you recommended.</div><div><br></div><div>iain</div></div><br><div class="gmail_quote"><div dir="ltr" class="gmail_attr">On Sun, Apr 19, 2020 at 12:52 AM Orm Finnendahl &lt;<a href="mailto:orm.finnendahl@selma.hfmdk-frankfurt.de">orm.finnendahl@selma.hfmdk-frankfurt.de</a>&gt; wrote:<br></div><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex">Hi Iain,<br>
<br>
 some of the differences out of my head:<br>
<br>
- no argument destructuring like<br>
<br>
  (loop for (x y . rest) on seq<br>
        while y<br>
        do (display (format &quot;~a~%&quot; (cons (+ x y) rest))))<br>
<br>
- no array traversal like<br>
<br>
  (loop for x across my-array do (display (format &quot;~a~%&quot; x))<br>
<br>
- no hash table traversal like<br>
<br>
  (loop for k<br>
        being the hash-key<br>
        using (hash-value v) of h<br>
        do (display (format &quot;~a ~a~%&quot; k v)))<br>
<br>
There are more things loop provides which weren&#39;t considered essential<br>
or even useful in the context of a process. IIRC things like<br>
&quot;collect&quot;, &quot;append&quot; or &quot;into&quot; aren&#39;t present. To assemble a complete<br>
list check the loop chapter in cltl2 here:<br>
<br>
<a href="https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node235.html#SECTION003000000000000000000" rel="noreferrer" target="_blank">https://www.cs.cmu.edu/Groups/AI/html/cltl/clm/node235.html#SECTION003000000000000000000</a><br>
<br>
More importantly there are bugs in the code when variables reference<br>
each other like this:<br>
<br>
(sprout<br>
 (process<br>
   for a in &#39;(0 1 2)<br>
   for b = a then (+ a 1)<br>
   do (display (format &quot;a: ~a, b: ~a~%&quot; a b))))<br>
<br>
-&gt; a: 0, b: #f<br>
-&gt; a: 1, b: 1<br>
-&gt; a: 2, b: 2<br>
<br>
The expected output would be:<br>
<br>
-&gt; a: 0, b: 0<br>
-&gt; a: 1, b: 2<br>
-&gt; a: 2, b: 3<br>
<br>
I fixed it in the CL code base in my github repository of CM. It<br>
shouldn&#39;t be too difficult to translate that into scheme.<br>
<br>
With the current code base I think it&#39;s a good idea to advise users<br>
against cross referencing variables in the initialization and updating<br>
phase of the process form.<br>
<br>
--<br>
Orm<br>
<br>
<br>
Am Samstag, den 18. April 2020 um 18:53:29 Uhr (-0700) schrieb Iain Duncan:<br>
&gt; Hi everyone, there was a comment a while back that the loop macro provided<br>
&gt; by the CM scheme code is not a perfect implementation of CL&#39;s loop. I&#39;d<br>
&gt; like to use it in Scheme for Max, but as I don&#39;t know either CL or CM well,<br>
&gt; can anyone tell me more about where this diverges or doesn&#39;t implement the<br>
&gt; &quot;normal&quot; CL loop macro? I want to make sure I document this properly for<br>
&gt; users coming from CL.<br>
&gt; <br>
&gt; thanks<br>
&gt; iain<br>
<br>
&gt; _______________________________________________<br>
&gt; Cmdist mailing list<br>
&gt; <a href="mailto:Cmdist@ccrma.stanford.edu" target="_blank">Cmdist@ccrma.stanford.edu</a><br>
&gt; <a href="https://cm-mail.stanford.edu/mailman/listinfo/cmdist" rel="noreferrer" target="_blank">https://cm-mail.stanford.edu/mailman/listinfo/cmdist</a><br>
<br>
_______________________________________________<br>
Cmdist mailing list<br>
<a href="mailto:Cmdist@ccrma.stanford.edu" target="_blank">Cmdist@ccrma.stanford.edu</a><br>
<a href="https://cm-mail.stanford.edu/mailman/listinfo/cmdist" rel="noreferrer" target="_blank">https://cm-mail.stanford.edu/mailman/listinfo/cmdist</a><br>
<br>
</blockquote></div>