在 Python 中,假设定义了以下函数:
def function(a, b, c):
... do stuff with a, b, c ...
我可以使用 Python 的序列解包来使用该函数:
arguments = (1, 2, 3)
function(*arguments)
Common Lisp 中是否存在类似的功能?所以如果我有一个功能:
(defun function (a b c)
... do stuff with a, b, c ...
如果我有 3 个元素的列表,我可以轻松地将这 3 个元素用作函数的参数吗?
我目前实现它的方式如下:
(destructuring-bind (a b c) (1 2 3)
(function a b c))
有没有更好的办法?