[racket] Problem with macro

From: Casey Klein (clklein at eecs.northwestern.edu)
Date: Fri Aug 12 08:33:55 EDT 2011

On Fri, Aug 12, 2011 at 7:26 AM, Jay McCarthy <jay.mccarthy at gmail.com> wrote:
> 2011/8/11 Racket Noob <racketnoob at hotmail.com>:
>>
>> (define-syntax automaton
>>   (syntax-rules (: -> END)
>>     [(_ init-state
>>         (state : transition ...)
>>         ...)
>>      (letrec ([curr-state empty]
>>               [state
>>                (lambda (symbol)
>>                  (case symbol
>>                    [(process-state transition)]
>
> The line above here should be a case clause, but it only has one part.
> I think you meant [process-state transition]
>

That doesn't fix it. He needs the uses of `process-state' to be
expanded before the `case' is expanded.



Posted on the users mailing list.