ng.org
> [mailto:users-boun...@racket-lang.org] On Behalf Of Eli Barzilay
> Sent: 08 March 2011 15:46
> To: Yaron Gonen
> Cc: users@racket-lang.org; Sam Tobin-Hochstadt
> Subject: Re: [racket] Different behavior when using
> (#%require scheme/base)
>
> 20 minutes ago, Yaron Gonen wrote:
20 minutes ago, Yaron Gonen wrote:
> Thanks for the fast reply.
> One thing I don't understand: 'exp' is bounded without
> scheme/base. What is so special about the new binding in
> scheme/base? For example, the following code works fine:
>
> (define foo
> (lambda (x)
> (* x x)))
>
> (defi
Thanks for the fast reply.
One thing I don't understand: 'exp' is bounded without scheme/base. What is
so special about the new binding in scheme/base?
For example, the following code works fine:
(define foo
(lambda (x)
(* x x)))
(define foo
(lambda (b e)
(if (= e 0) 1
(* b (f
[File under "The top level is hopeless". A web search on that phrase
should turn up related explanations, questions, and answers.]
At Tue, 8 Mar 2011 07:50:16 -0500, Sam Tobin-Hochstadt wrote:
> `scheme/base' provides a binding called `exp', which requires 2
> arguments. When the compiler expand
`scheme/base' provides a binding called `exp', which requires 2
arguments. When the compiler expands your definition, it looks at the
variable reference in the body of the function *before* it binds your
new `exp' definition. Therefore, it uses the `exp' that it has in
scope at that time -- the o
Hi,
(I'm using Dr Scheme version 4.2.2, with language R5RS, and the "Disallow
redefining" is *not* checked.)
The following code works perfectly:
(define exp
(lambda (b e)
(if (= e 0) 1
(* b (exp b (- e 1))
(exp 2 5)
However, when I include the line (#%require scheme/base), I get
6 matches
Mail list logo