[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Macro expansion suggestions
- To: common-lisp at SU-AI
- Subject: Macro expansion suggestions
- From: Richard M. Stallman <rms at MIT-AI>
- Date: Thu, 28 Jan 1982 21:13:00 -0000
If (fposition #'equal x) is defined so that when in function position
it "expands" to a function, then (mapcar (fposition ...)) loses
as JONL says, but (mapcar #'(fposition ...)...) can perhaps be
made to win. If (function (fposition...)) expands itself into
(function (lambda (arg arg...) ((fposition ...) arg arg...)))
it will do the right thing. The only problem is to determine
how many args are needed, which could be a property of the symbol
fposition, or could appear somewhere in its definition.
Alternatively, the definition of fposition could have two "operations"
defined: one to expand when given an ordinary form with (fposition ...)
as its function, and one to expand when given an expression to apply
(fposition ...) to.