Lisp中“ apply”和“ mapcar”有什么区别

问题描述 投票:8回答:2
(defun describe-paths (location edges) 
(apply #'append (mapcar #'describe-path (cdr (assoc location edges)))))
lisp common-lisp
2个回答
11
投票

有什么相似之处?或者,这里还有另一个问题吗?


4
投票

describe-paths函数(来自Land of Lisp中基于文本的冒险游戏!)生成从给定位置出发的路径的描述。 Lasp of Lisp

© www.soinside.com 2019 - 2024. All rights reserved.