[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Avoiding recomputation or recapitulation: (g x x)
- To: lisp-forum at MIT-AI
- Subject: Avoiding recomputation or recapitulation: (g x x)
- From: SHRAGE at WHARTON-10 (Jeffrey Shrager)
- Date: 25 Jun 1981 (Thursday) 1736-EDT
How about a macro, WHERE, that had a form something like:
(where ((x e1) (y e2) ...)
expr)
==> ((lambda (x y ...) expr) e1 e2 ...)
Then one could say : (where ( (x 5) (y 6) ) (+ x x (/ y x)) ) [or something
like that]. No need for locals beyond the scope of the expression, no need
for fifo register description, self-cleaning (via lambda), etc. You still
have to give the args names but they are cleanly localized by lambda.