Received: from cs.bu.edu (kfoury@fiddle [128.197.10.114]) (authenticated bits=0) by cs.bu.edu (8.12.2/8.12.2) with ESMTP id i8KKkdb0012310; Mon, 20 Sep 2004 16:46:39 -0400 (EDT) Sender: kfoury Message-ID: <414F41A9.F55E256B@cs.bu.edu> Date: Mon, 20 Sep 2004 16:46:33 -0400 From: "Assaf J. Kfoury" <kfoury@cs.bu.edu> Organization: Boston University X-Mailer: Mozilla 4.78 [en] (X11; U; SunOS 5.8 sun4u) X-Accept-Language: en To: Hany Morcos <hmorcos@cs.bu.edu>, cs520@cs.bu.edu Subject: Re: question about ch. 5 References: <Pine.SOL.4.20.0409201355310.2039-100000@csa.bu.edu> <414F1C54.B72D68AE@cs.bu.edu> <00b401c49f49$f8954e60$a00ac580@hmorcos> Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit Content-Length: 928 Status: X-Mozilla-Status: 8011 X-Mozilla-Status2: 00000000 X-UIDL: 411f69ec00000a4f
I think you are referring to the *parentheses*. There
are no *braces*, i.e., "{" and "}", in the definitions of
scc, plus and times.
Look at the definition of scc:
lambda n. lambda s. lambda z. s (n s z)
If you omit the parentheses, then you will get a new
definition, equivalent to the following -- call it scc'
scc' = lambda n. lambda s. lambda z. (((s n) s) z)
If you apply scc' to a Church numeral c_k and evaluate
the application (scc' c_k), you will *not* get c_{k+1}.
So, without the parentheses in the definition of scc,
you will not get the desired behavior.
(See also page 6 in my Handout 4.)
I hope this answers your question.
Assaf
Hany Morcos wrote:
> Prof. Kfoury,
>
> I have a question in ch. 5. In the definition of the functions scc, plus and
> times ... (p 61)
> What is the meaning of the braces around some arguments ? how does that
> affect the evaluation of the function ?
>
> Thanks,
> Hany
This archive was generated by hypermail 2b29 : Fri Nov 19 2004 - 17:00:43 EST