~brian-sidebotham/wxwidgets-cmake/wxpython-2.9.4

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
; Syntax Highlighting Test File for Lisp
; Comment Line

; Lisp funciton and keyword test
(defpackage :mypackage
  (:use :common-lisp :cffi))

; hello version 1
(defun hello-word1 ()
  (print (list 'HELLO 'WORLD)))

; hello version 2
(defun hello-world ()
  (format t "hello world~%"))

; Lets do some factorials too
(defun factorial (N)
  (if (= N 1)
      1
    (* N (factorial (- N 1)))))

; Fibonacci numbers are fun too
(defun fibonacci (N)
  (if (or (zerop N) (= N 1))
      1
    (+ (fibonacci (- N 1)) (fibonacci (- N 2)))))