[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Apply-But-Last
From: vanroggen@DEC-HUDSON
Subject: SETF APPLY ...
It seems to me that we could have both the newvalue passed as the
last arg of the setting function and the ability to do SETF of
APPLY if we would admit to a function, that I'll call APPLY-BUT-LAST,
that's just like APPLY, except that it's the next-to-last argument
that must be a list, and the last argument is just passed as the
last argument to the applied function.
That name is misleading (too much in common with some list manipluation
functions), and the effect can be obtained portably (and reasonably efficiently
(even with dumb compilers)) with Multiple-Value-Call:
(multiple-value-call #'function arg1 arg2 ...
(values-list rest-arg)
last-arg)
--Skef