Hello,<br><br>this is on clisp 2.48 on cygwin.<br><br>The function low-discrepancy-sample could not compile because iterate could not digest loop<br><br>*****<br>Iterate, in clause (COLLECT<br> (APPLY MAKE-FUNCTION<br> (APPEND FIXED-PARAMETERS<br>
(MAPCAN<br> (LAMBDA (X SEQ)<br> (LIST (FIRST X) (VAL-FROM-RANGE (GREF V SEQ) (SECOND X) (THIRD X))))<br> SWEEP-PARAMETERS<br> (LOOP FOR I FROM 0 BELOW (LENGTH SWEEP-PARAMETERS) COLLECT I))))):<br>Iterate does not know how to handle the special form (MACROLET<br>
((LOOP-FINISH NIL (SYSTEM::LOOP-FINISH-ERROR)))<br> (BLOCK NIL<br> (LET ((I 0) (#:LIMIT-273656 (LENGTH SWEEP-PARAMETERS)))<br> (PROGN<br> (LET ((#:ACCULIST-VAR-273657 NIL))<br> (MACROLET ((LOOP-FINISH NIL '(GO SYSTEM::END-LOOP)))<br>
(TAGBODY SYSTEM::BEGIN-LOOP<br> (WHEN (COMMON-LISP:>= I #:LIMIT-273656) (LOOP-FINISH))<br> (PROGN (SETQ #:ACCULIST-VAR-273657 (CONS I #:ACCULIST-VAR-273657)))<br> (PSETQ I (COMMON-LISP:+ I 1)) (GO SYSTEM::BEGIN-LOOP) SYSTEM::END-LOOP<br>
(MACROLET<br> ((LOOP-FINISH NIL (SYSTEM::LOOP-FINISH-WARN) '(GO SYSTEM::END-LOOP)))<br> (RETURN-FROM NIL (SYSTEM::LIST-NREVERSE #:ACCULIST-VAR-273657))))))))))<br>It will not be walked, which means that Iterate clauses inside it will not be seen.<br>
*****<br><br>If I replaced the loop form with the much more verbose<br><br>(let (res)<br> (dotimes (i (length sweep-parameters) (nreverse res))<br> (push i res)))<br><br>the code compiled cleanly.<br><br>
The same error can be seen with a much simpler:<br>(iter:iter<br> (iter:for v iter:in '(1 2 3 4))<br> (iter:collect (loop for i in v)))<br><br>Another alternative is to use iter instead of loop<br><br>(iter:iter<br>
(iter:for i from 0 below (length sweep-parameters))<br> (iter:collect i))<br><br>It compiles cleanly, but I did not test the function accuracy.<br><br>Mirko<br>