Subject: Re: Any macro for inserting math "normally"
From: rpw3@rpw3.org (Rob Warnock)
Date: Sat, 28 Apr 2007 23:11:32 -0500
Newsgroups: comp.lang.lisp
Message-ID: <382dnWeBSItph6nbnZ2dnUVZ_tunnZ2d@speakeasy.net>
szergling  <senatorZergling@gmail.com> wrote:
+---------------
| For an interesting talk by Gerald Sussman on the ambiguity of
| 'standard mathematical notation', there is an amusing video from
| Danfest2004 (http://www.cs.indiana.edu/dfried_celebration.html)
| about calculus and mechanics, among other things. It was here
| that I realised that Scheme has implicit currying when defining
| functions -- (define ((sum x) y) ...)
+---------------

Except that it doesn't, at least not any of the "standardized"
versions up through R6RS. In R6RS (and earlier), DEFINE has only
two forms, a "primitive" form:

   (DEFINE var value)		; though VALUE may be a LAMBDA expr.

and a "convenience" form[1] defined in terms of the first [where
"FORMALS..." can be an improper list, the last symbol being a &REST
arg in the CL sense]:

   (DEFINE (func formals...) body)
     ==> (DEFINE func (LAMBDA (formals...) body))

See <http://www.r6rs.org/document/html/r6rs-Z-H-12.html#node_sec_9.2>

I suspect Sussman may have been using his own personal
experimental/extended version of Scheme in that talk.


-Rob

[1] Well, plus one more variant of the "convenience" form
    in the case of a single &REST arg:

      (DEFINE (func . arg) body) ==> (DEFINE func (LAMBDA arg body))

-----
Rob Warnock			<rpw3@rpw3.org>
627 26th Avenue			<URL:http://rpw3.org/>
San Mateo, CA 94403		(650)572-2607