<html>
<br>
Greetings,<br><br>
I took a define-syntax definition for 'do' from "The Scheme<br>
Programming Language" by Dybvig and tried it under DrScheme<br>
version 200. The definition and error is as follows:<br><br>
<font size=3>(define-syntax debug-do<br>
(lambda (x)<br>
(syntax-case x ()<br>
((_ (binding ...) (test res ...) exp
...)<br>
(with-syntax ((((var val update)
...)<br>
(map (lambda (b)<br>
(syntax-case b ()<br>
((var val)<br>
(syntax (var val var)))<br>
((var val update)<br>
(syntax (var val update)))))<br>
(syntax (binding ...)))))<br>
(syntax (let doloop
((var val) ...)<br>
(if test<br>
(begin (if #f #f) res ...)<br>
(begin exp ... (doloop update ...))))))))))<br><br>
(define try<br>
(lambda (m)<br>
(debug-do ((i 0 (+ i 1)))<br>
((> i m) 88)<br>
(display i)<br>
(newline))))<br><br>
<br>
'try' works fine with the real 'do' but gives the following error with
'debug-do'<br>
at definition time:<br><br>
map: expects type <list> as 2nd argument, given:
#<syntax:C:\Scheme-debugger\debugger.scm:266:28>; other arguments
were: #<procedure:...ger\debugger.scm:260:28><br><br>
(debugger.scm is a debugger I'm working on - It actually
works!)<br><br>
I need this code to work for real. It's not just an exercise for
me.<br>
Your help is appreciated.<br><br>
--blake<br>
<x-sigsep><p></x-sigsep>
-------<br>
Download source code to my Dynace Object Oriented<br>
Extension to C from
<a href="http://algorithms.us/" eudora="autourl">http://algorithms.us<br>
</a></font></html>