[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Chicken-users] dynamic scoping
From: |
Daniel Ajoy |
Subject: |
[Chicken-users] dynamic scoping |
Date: |
Wed, 26 Jun 2013 16:47:46 -0500 |
User-agent: |
Opera Mail/12.15 (Win32) |
"add" binds a to 1 at the moment of definition.
#;48> (define a 1)
#;49> (define (add x) (+ x a) )
#;50> (add 10)
11
#;51> (let ((a 100) ) (add 10) )
11
Is there a way to give a different value of "a" to add, so that, something like
this happens:
(let ((a 100) ) (add 10) )
110
Daniel
- [Chicken-users] dynamic scoping,
Daniel Ajoy <=