Lisp

Steel Bank Common Lisp(sbcl)

Installation

Ubuntu
apt install sbcl
Arch Linux
pacman -S sbcl
Binary
# Download sbcl-{version}-{arch}-{os}-binary.tar.bz2 from http://www.sbcl.org
tar xjf sbcl-{version}-{arch}-{os}-binary.tar.bz2
cd sbcl-{version}-{arch}-{os}
INSTALL_ROOT=/usr/local sh install.sh

Examples

Fibonacci Numbers
;Fibonacci Numbers
(defun args ()
  #+sbcl sb-ext:*posix-argv*)

(defun fib (n)
  (if (< n 2)
    n
    (+ (fib (- n 2)) (fib (- n 1)))))

(print (fib (parse-integer (nth 1 (args)))))

#|
  example
    run:
      sbcl --script fib.lisp 39
|#