[plt-scheme] Re: top-level error

From: Jon Zeppieri (zeppieri at gmail.com)
Date: Wed May 9 20:31:01 EDT 2007

odd? is a standard scheme procedure.  The first line is not using your
definition of odd?.  Change the name to my-odd? and see what happens.


On 5/9/07, Day <day7195891 at gmail.com> wrote:
> However, why the code below works well??? I use odd? before its
> definition, but no complaint from DrScheme. That's why I am confused?
> So could someone talks more about the top-level in detail?
>
>
> (define test (odd? 4))
>
> (define even?
>   (lambda (x)
>     (if (= x 0)
>         #t
>         (odd? (- x 1)))))
>
> (define odd?
>   (lambda (x)
>     (if (= x 0)
>         #f
>         (even? (- x 1)))))
>
> _________________________________________________
>   For list-related administrative tasks:
>   http://list.cs.brown.edu/mailman/listinfo/plt-scheme
>


Posted on the users mailing list.