tag:blogger.com,1999:blog-10770855.post111420920596711276..comments2024-03-28T03:20:57.393-04:00Comments on The Little Calculist: When to reserve keywordsDave Hermanhttp://www.blogger.com/profile/00405190527081772997noreply@blogger.comBlogger1125tag:blogger.com,1999:blog-10770855.post-51195483265898069032010-02-22T04:31:41.518-05:002010-02-22T04:31:41.518-05:00Hi,
Thanks, that was interesting.
Apparently, no...Hi,<br /><br />Thanks, that was interesting.<br /><br />Apparently, now MzScheme produces a syntax-error (albeit a succinct one) on the below example.<br /><br />So, is there now no need to use provide-keyword for such cases?<br /><br />Thanks,<br />Laurent<br /><br />#lang scheme<br /><br />(define-syntax cond2<br /> (syntax-rules (else)<br /> [(_ [else a-exp]) <br /> a-exp]<br /> [(_ [q0-exp a0-exp] [q1-exp a1-exp] ...)<br /> (if q0-exp a0-exp (cond2 [q1-exp a1-exp] ...))]))<br /><br />; This one is ok, no problem.<br />(cond2 [#f 1]<br /> [else 2])<br /><br />; There is now a syntax error in the program.<br />(let ([else #f])<br /> (cond2 [#f 3]<br /> [else 4]))<br /><br />(sorry for the indentation mess...)Laurenthttps://www.blogger.com/profile/18317864132967373178noreply@blogger.com