CLisp

文档

简书图片不显示,这里有英文原版
优秀文档
也不错的教程

ubuntu下安装clisp

教程


sudo apt-get install clisp

创建./CLisp/test.lisp

(defun helloworld () (format t "hello world"))
(helloworld)

clisp
(load "test.lisp")
(helloworld)
或者
clisp test.lisp即可

语法知识

(terpri) 换行

eval 解释器

'string = (quote string) 标记不应该被求值的变量

cond、if

(
    defun cmp (x y)
    (   
        cond 
            ((equal x y) '=) 
            ((< x y) '<) 
            ((> x y) '>) 
    )   
)

(
  if (= 1 2)
    (write '=)
    (write '!=)
)
posted @ 2022-03-28 17:30  XDU18清欢  阅读(105)  评论(0)    收藏  举报