lisp精要(2)-基础(1)
生活随笔
收集整理的這篇文章主要介紹了
lisp精要(2)-基础(1)
小編覺得挺不錯的,現在分享給大家,幫大家做個參考.
* ( format t "hello,world")
hello,world
NIL
* (defun hello-world () (format t "hello,world"))
HELLO-WORLD
* (hello-world)
hello,world
NIL
* (list 10 20 30 40 50 60)
(10 20 30 40 50 60)
*
format屏幕輸出 defun 定義函數 list 定義列表 :屬性名 屬性值 getf 返回屬性值 定義函數時可指定參數
(defun newStudent (name age) ...)
0[2] (list :name "lisi" :age 28)(:NAME "lisi" :AGE 28)
0[2] (getf (list :name "lisi" :age 28) :name)"lisi"
0[2] (defun newStudent (name age) (list :name name :age age))
總結
以上是生活随笔為你收集整理的lisp精要(2)-基础(1)的全部內容,希望文章能夠幫你解決所遇到的問題。
- 上一篇: springboot配置跨mapper.
- 下一篇: 学习Spring Boot:(三)配置文