Created
June 15, 2016 10:58
-
-
Save dyama/5b8b76fb2f89bccbabd691253deadf40 to your computer and use it in GitHub Desktop.
Indended lisp sample
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
; ookiihou wo kaesu max kansuu | |
(defun ooki (x y) | |
(if (> x y) | |
x | |
y)) | |
; fibonacchi suu wo kaesu | |
(defun fib (n) | |
(if (< n 2) | |
n | |
(+ (fib (- n 1)) (fib (- n 2))))) | |
(dotimes (i 5) | |
(princ (fib i)) | |
(format t " ")) | |
(setq hoge | |
(cons 1 'a)) | |
(print hoge) | |
(format t "~%--- TEST ---~%") | |
(setq list '(1 2 3 4 5)) | |
(dolist (j list) | |
(princ j) | |
(format t " ")) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment