相关疑难解决方法(0)

常见的lisp从功能推送

我有以下常见的lisp函数:(aggregate line1 line2)(queuer data result).

queuer如果它们的第一个字段不同,或者如果它们的第一个字段相等line1,line2那么它们应该将值与第一个字段不同,或者这两个行的集合.

我不知道为什么它不会改变我的结果列表.

注意:我正在初始化结果列表,其中(push (pop data) result)包含第一个元素.2个列表是1深度嵌套列表(("1" "text") ("2" "text") (...)).

(defun aggregate (line1 line2)
  (progn
    (list 
     (nth 0 line1)
     (nth 1 line1)
     (nth 2 line1)
     (concatenate 'string (nth 3 line1) ", " (nth 3 line2))
     (concatenate 'string (nth 4 line1) ", " (nth 4 line2)))))

(push (pop x) y)

(defun queuer (data result)
  (loop do
       (let ((line1 (pop data))
             (line2 (pop …
Run Code Online (Sandbox Code Playgroud)

lisp common-lisp

5
推荐指数
2
解决办法
2433
查看次数

标签 统计

common-lisp ×1

lisp ×1