guile-user
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Define in let


From: David Pirotte
Subject: Re: Define in let
Date: Tue, 20 Aug 2013 18:01:37 -0300

Hello,

> It seems following is invalid:
> 
>    (let ((a 2))
>         (define (foo x) (+ a x)))
> 
> I prefer to reduce scope of variable as much as possible, so
> I find this restriction unconvinent. Is is part of standard or technical
> limitation? Is it any workaround?

Section '3.4.7 Example 2: A Shared Persistent Variable' is probably what you 
want?

Cheers,
David



reply via email to

[Prev in Thread] Current Thread [Next in Thread]