Skip to content

Instantly share code, notes, and snippets.

@dyama
Created June 15, 2016 10:58
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save dyama/5b8b76fb2f89bccbabd691253deadf40 to your computer and use it in GitHub Desktop.
Save dyama/5b8b76fb2f89bccbabd691253deadf40 to your computer and use it in GitHub Desktop.
Indended lisp sample
; 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