[plt-scheme] Newbie Schemer question
Daniel CAUNE wrote:
>I would like to execute a function that has one of its variable defined
>outside this function, in an upper context. Suppose that I define a simple
>function such as:
>
>(define (f n)
> (+ *p* n))
>
>I would like to write something like that (the following syntax is
>incorrect):
>
>((let ((*p* 1))
> (lambda ()
> (f 2)))
>
>How should I formulate this in Scheme?
>
>
>
Do you know
set!
?
The only reason I'm asking this question, is that you wrote newbie in
the subject line.
--
Jens Axel Søgaard