Message from discussion
Associativity paradox in functional expressions
Received: by 10.216.216.131 with SMTP id g3mr626971wep.10.1352390964488;
Thu, 08 Nov 2012 08:09:24 -0800 (PST)
From: "Pascal J. Bourguignon" <p...@informatimago.com>
Newsgroups: comp.lang.functional,comp.lang.lisp,comp.lang.scheme,comp.programming,comp.emacs
Subject: Re: Associativity paradox in functional expressions
Date: Tue, 06 Nov 2012 07:28:47 +0100
Organization: Informatimago
Lines: 30
Message-ID: <87ip9j8ctc.fsf@informatimago.com>
References: <8120f97b-15c2-4ce8-827a-158e955fb73f@z2g2000yqj.googlegroups.com>
<9972e570-2504-4401-8de8-49eb1929fdfd@c17g2000yqe.googlegroups.com>
<87pq3wqftc.fsf@voyager.informatimago.com>
<3dd68e98-9889-4287-a352-3c7c25a3284e@d17g2000vbv.googlegroups.com>
<87liejml8j.fsf@informatimago.com>
<e2187fc0-9ccf-4fb8-8f1f-afd7df99964f@x21g2000vbg.googlegroups.com>
Mime-Version: 1.0
X-Trace: individual.net Piyn4m2DRbnhsyBAZ1mdqgww+WqKTP9HEDXp/6RuwSH//5kzug2xXv9KKPqGKHySIm
Cancel-Lock: sha1:M2JjZGQ3NGIzYzljYTQxOWY0MTYzYjQ3OTFhOTU5ZjhiNTZhYzJhZg== sha1:9TD083nMunF5BWMc7yMuEJ78ksE=
Face: iVBORw0KGgoAAAANSUhEUgAAADAAAAAwAQMAAABtzGvEAAAABlBMVEUAAAD///+l2Z/dAAAA
oElEQVR4nK3OsRHCMAwF0O8YQufUNIQRGIAja9CxSA55AxZgFO4coMgYrEDDQZWPIlNAjwq9
033pbOBPtbXuB6PKNBn5gZkhGa86Z4x2wE67O+06WxGD/HCOGR0deY3f9Ijwwt7rNGNf6Oac
l/GuZTF1wFGKiYYHKSFAkjIo1b6sCYS1sVmFhhhahKQssRjRT90ITWUk6vvK3RsPGs+M1RuR
mV+hO/VvFAAAAABJRU5ErkJggg==
X-Accept-Language: fr, es, en
User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/23.4 (darwin)
Path: q13ni191364wii.0!nntp.google.com!feeder2.cambriumusenet.nl!feeder1.cambriumusenet.nl!feed.tweaknews.nl!209.197.12.246.MISMATCH!nx02.iad01.newshosting.com!69.16.185.11.MISMATCH!npeer01.iad.highwinds-media.com!news.highwinds-media.com!feed-me.highwinds-media.com!nx01.iad01.newshosting.com!newshosting.com!216.196.98.142.MISMATCH!border3.nntp.dca.giganews.com!border1.nntp.dca.giganews.com!nntp.giganews.com!news.mccarragher.com!news.astraweb.com!border6.newsrouter.astraweb.com!news.glorb.com!feeder.erje.net!us.feeder.erje.net!news2.arglkargh.de!news.karotte.org!fu-berlin.de!uni-berlin.de!individual.net!not-for-mail
Bytes: 2933
X-Received-Bytes: 2917
Content-Type: text/plain; charset=utf-8
Content-Transfer-Encoding: 8bit
Rivka Miller <rivkaumil...@gmail.com> writes:
> Are you saying that the Late Dr McCarthy, after thinking of lisp in
> terms of lambda calculus (and its associated currying), nevertheless
> implemented it in terms of variadic non-curried functions? Thus the
> turing machine replacement that lambda calculus is supposed to be,
> does not need any currying to be a replacement of turing machine - in
> the sense of computability?
Yes. John McCarthy didn't understand lambda calculus at the time. He
just used the lambda notation for his functions, but they differed
greately, notably in that he used dynamic binding instead of lexical
binding.
> How would the "(funcall g g n)" and "(funcall f f (1- n))" in the
> function advanced by the OP supposed to be associated if currying were
> available?
>
> ((lambda(g n) (funcall g g n))
> (lambda(f n)
> (if (zerop n) 1
> (* n (funcall f f (1- n)))))
> 4 )
Well, in lisp there are parentheses to imply the order of evaluation…
--
__Pascal Bourguignon__
http://www.informatimago.com