[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Macro expansion suggestions

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.