Simulate a where in scheme with defmac
I'm actually faced to a problem in Scheme. And I just don't have any idea
about how to solve it. It is pretty simple to understand and I guess kind
of easy for any Scheme expert. I just have to simulate the where
expression of haskell with the defmac function in scheme defining a macro
"operation". For example, to execute a code like the following
> (operation (+ x y)
where ([x 1]
[y (+ x 32)]))
34
I'm kind of familiar with the way to represent simple objects in scheme
with macros (defmac) but now i'm really stuck with this problem.
Any help or idea would be really welcome. Thank you in advance.
No comments:
Post a Comment