Article View: comp.lang.misc
Article #5402multiple values
From: Karl Heuer
Date: Tue, 29 Mar 1988 18:18
Date: Tue, 29 Mar 1988 18:18
27 lines
1704 bytes
1704 bytes
In article <727@l.cc.purdue.edu> cik@l.cc.purdue.edu (Herman Rubin) writes:
>In article <3177@haddock.ISC.COM>, karl@haddock.ISC.COM (Karl Heuer) writes:
>> (setq z
>> ((lambda (qr) (+ (* (car qr) (car qr)) (* (cdr qr) (cdr qr))))
>> (div x y)))
>
>In Lisp, the language certainly suggests that at some time there is a real
>machine object called qr. The way I am proposing the list, this is never
>more than a virtual object, and does not need a name. However, the user
>assigns names to the elements of the list, and refers to them, rather than
>having to write (car qr) and (cdr qr).
So? The way I wrote it, q and r are never more than unnamed virtual objects.
I'm looking for a syntax that allows all three (qr, q, r) to disappear, if
all I really want is an expression that returns q*q+r*r. If we allow 2-d
notation, this could be written
+---+
+---+ /-->| * |
x-->| |---+--->| |---\ +---+
|div| +---+ --->| + |--->z
y-->| |--\ +---+ --->| |
+---+ +--->| * |---/ +---+
\-->| |
+---+
Karl W. Z. Heuer (ima!haddock!karl or karl@haddock.isc.com), The Walking Lint
Technical Details
Message-ID:
<3213@haddock.ISC.COM>Path:
arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!mailrus!ames!necntc!ima!haddock!karlReferences:
<12176@brl-adm.ARPA> <1988Mar11.215238.976@utzoo.uucp> <3177@haddock.ISC.COM> <727@l.cc.purdue.edu>Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!utzoo!mnetor!uunet!husc6!mailrus!ames!necntc!ima!haddock!karl From: karl@haddock.ISC.COM (Karl Heuer) Newsgroups: comp.lang.misc Subject: multiple values Message-ID: <3213@haddock.ISC.COM> Date: 29 Mar 88 18:18:04 GMT References: <12176@brl-adm.ARPA> <1988Mar11.215238.976@utzoo.uucp> <3177@haddock.ISC.COM> <727@l.cc.purdue.edu> Reply-To: karl@haddock.ima.isc.com (Karl Heuer) Organization: Interactive Systems, Boston Lines: 27