chicken-users
[Top][All Lists]
Advanced

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

[Chicken-users] nested definitions


From: Andy Coolware
Subject: [Chicken-users] nested definitions
Date: Wed, 5 Sep 2012 14:12:31 -0700

Hi,

This is my first post here. I am interested in FP in general, Clojure
and Scala in specific.  But reaching to roots as Scheme as well from
time.

So I git stuck with a question inspired by "Structure and
Interpretation"  http://www.youtube.com/watch?v=2Op3QLzMgSY  at almost
end of the video  @ 1:11:11 .

So in Scheme we apparently can do such a definition:

> (define ((A)) 1)
#<void>
> A
#<procedure:A>
> (A)
#<procedure>
> ((A))
1

For my taste, a lot of happen here besides defining A. Scheme somehow
is able to "figure out" and destruct A from ((A)) in order to make it
possible. Interestingly enough:

http://schemers.org/Documents/Standards/R5RS/HTML/r5rs-Z-H-8.html#%_sec_5.2
does not seem to cover that case.

So my question is, what really happens here?

Thanks in advance,
Andy



reply via email to

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