<div><div style="font-family:arial"><span style="font-family:'courier new',monospace">Although the following code works perfectly well in DrRacket environment, it generates the following error in WeScheme:</span></div>
<div style="font-family:arial"><span style="background-color:rgb(255,255,255)"><font face="courier new, monospace"> </font></span><span style="background-color:rgb(255,255,255);color:rgb(255,0,0);font-family:Monaco,sans-serif;font-size:12px">Inside a cond branch, I expect to see a question and an answer,</span><span style="background-color:rgb(255,255,255);color:rgb(255,0,0);font-family:Monaco,sans-serif;font-size:12px"> </span><span style="background-color:rgb(255,255,255);color:rgb(255,0,0);font-family:Monaco,sans-serif;font-size:12px">but I see more than two things here.</span></div>
<div><span class="Error.location" style="background-color:rgb(255,255,255)"><p class="location-paragraph" style="color:rgb(255,0,0);font-family:Monaco,sans-serif;font-size:12px;margin-top:0px;margin-bottom:0px"> <a href="http://www.wescheme.org/openEditor#">at: line 15, column 4, in <definitions></a></p>
<p class="location-paragraph" style="color:rgb(255,0,0);font-family:Monaco,sans-serif;font-size:12px;margin-top:0px;margin-bottom:0px"><br></p></span></div><div><font face="courier new, monospace">How do I fix this? </font><span style="background-color:rgb(255,255,255)">The actual code is available at </span><a href="http://www.wescheme.org/view?publicId=gutsy-buddy-woken-smoke-wrest" target="_blank" style="background-color:rgb(255,255,255);color:rgb(34,34,34);font-family:Verdana,Arial,sans-serif;font-size:18px">http://www.wescheme.org/view?publicId=gutsy-buddy-woken-smoke-wrest</a></div>
</div><div><font face="courier new, monospace"><br></font></div><div><span style="font-family:'courier new',monospace">(define (insert l n e)</span></div><div style="font-family:'courier new',monospace"> (if (= 0 n)</div>
<div style="font-family:'courier new',monospace"> (cons e l)</div><div style="font-family:'courier new',monospace"> (cons (car l) </div><div style="font-family:'courier new',monospace"> (insert (cdr l) (- n 1) e))))</div>
<div style="font-family:'courier new',monospace"> </div><div style="font-family:'courier new',monospace">(define (seq start end)</div><div style="font-family:'courier new',monospace"> (if (= start end)</div>
<div style="font-family:'courier new',monospace"> (list end)</div><div style="font-family:'courier new',monospace"> (cons start (seq (+ start 1) end))))</div><div style="font-family:'courier new',monospace">
<br></div><div style="font-family:'courier new',monospace">(define (permute l) </div><div style="font-family:'courier new',monospace"> (cond </div><div style="font-family:'courier new',monospace">
[(null? l) '(())]</div><div style="font-family:'courier new',monospace"> [else (define (silly1 p)</div><div style="font-family:'courier new',monospace"> (define (silly2 n) (insert p n (car l)))</div>
<div style="font-family:'courier new',monospace"> (map silly2 (seq 0 (length p))))</div><div style="font-family:'courier new',monospace"> (apply append (map silly1 (permute (cdr l))))]))</div>
<div><span style="font-family:'courier new',monospace"><br></span></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace"><br></font></div><div><font face="courier new, monospace"><br>
</font></div><div><font face="courier new, monospace"><br></font></div>