SBCL(Steel Bank Common Lisp)インストール
まずはMacにSBCLを入れる
$ brew install sbcl
あとはコードを書いていく。
手始めに。
$ sbcl
This is SBCL 1.3.1, an implementation of ANSI Common Lisp.
More information about SBCL is available at http://www.sbcl.org/.
SBCL is free software, provided as is, with absolutely no warranty.
It is mostly in the public domain; some portions are provided under
BSD-style licenses. See the CREDITS and COPYING files in the
distribution for more information.
サンプル
(1+ 10)
11
(+ 1 2 3)
6
(+(* 2 2)(- 5 2))
7
(1- 10)
9
空のリスト
()
NIL
LispでHello, World
(format t "Hello, World\n")
NILHello, Worldn
関数サンプル
(flet ((f (n)
(+ n 5)))
(f 5))
10
(flet ((関数名 (引数)
定義)
(関数名 (引数)
定義))
処理)