[plt-scheme] Syntax in teachpack doesn't work.
I was able to use that teachpack successfully under v372 (and in the
soon-to-be-released version). This is what I see, for example:
Welcome to DrScheme, version 372 [3m].
Language: Advanced Student custom; memory limit: 128 megabytes.
Teachpack: iteration.ss.
> repeat
repeat: bad syntax
> (repeat 2 (printf "hi\n"))
hi
hi
>
On Thu, Jun 19, 2008 at 8:42 AM, Paulo J. Matos <pocm at soton.ac.uk> wrote:
> Hello, I am trying to create a simple syntax teachpack and I have:
> (module iteration mzscheme
>
> ;; Simplified do
> (define-syntax for
> (syntax-rules ()
> ((for (var init cond step)
> command ...)
> (let loop ((var init))
> (if (not cond)
> (void)
> (begin
> command
> ...
> (loop step)))))))
>
> ;; Simplified^2 do
> (define-syntax repeat
> (syntax-rules ()
> ((repeat num command ...)
> (for (x 0 (< x num) (+ x 1))
> command ...))))
>
> (provide
> (all-defined)))
>
> Then I do add the teachpack and load it but when I try to use repeat:
> repeat: name is not defined, not a parameter, and not a primitive name
>
> I am surely missing something but don't know what (this is still version 372).
>
> Cheers,
> --
> Paulo Jorge Matos - pocm at soton.ac.uk
> http://www.personal.soton.ac.uk/pocm
> PhD Student @ ECS
> University of Southampton, UK
> _________________________________________________
> For list-related administrative tasks:
> http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>
>