应该是lamba表达式 - LISP [英] Should be a lamba expression-LISP

查看:162
本文介绍了应该是lamba表达式 - LISP的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

只是我代码的一个功能:

Just one function of my code:

(defun equalprev (x y)
  (cond ((or (atom x) (atom y))
         (if (not (null isLoop))
             t
           ((setq list1 (append list1 (list x)))
            (setq list2 (append list2 (list y)))
            (eql x y))))
        ((equalprev (car x) (car y))
         (equalprev (cdr x) (cdr y)))))

 

*** - SYSTEM::%EXPAND-FORM: (SETQ LIST1 (APPEND LIST1 (LIST X))) should be a lambda
expression
The following restarts are available:
ABORT          :R1      Abort main loop

任何帮助都赞赏

推荐答案

'if'表达式的替代表达式是((set!...)...)。第一个位置需要是函数或句法形式。在这种情况下,您需要progn:

The alternate expression for the 'if' expression is ((set! ...) ...). The first position needs to be either a function or a syntactic form. In this case you need progn as:

(progn
  (setq list1 ...)
  (setq list2 ...)
  (eql x y))

这篇关于应该是lamba表达式 - LISP的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆