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

« back to all changes in this revision

Viewing changes to wxPython/wx/tools/Editra/tests/syntax/lisp.lisp

  • Committer: Brian Sidebotham
  • Date: 2013-08-03 14:30:08 UTC
  • Revision ID: brian.sidebotham@gmail.com-20130803143008-c7806tkych1tp6fc
Initial import into Bazaar

Show diffs side-by-side

added added

removed removed

Lines of Context:
 
1
; Syntax Highlighting Test File for Lisp
 
2
; Comment Line
 
3
 
 
4
; Lisp funciton and keyword test
 
5
(defpackage :mypackage
 
6
  (:use :common-lisp :cffi))
 
7
 
 
8
; hello version 1
 
9
(defun hello-word1 ()
 
10
  (print (list 'HELLO 'WORLD)))
 
11
 
 
12
; hello version 2
 
13
(defun hello-world ()
 
14
  (format t "hello world~%"))
 
15
 
 
16
; Lets do some factorials too
 
17
(defun factorial (N)
 
18
  (if (= N 1)
 
19
      1
 
20
    (* N (factorial (- N 1)))))
 
21
 
 
22
; Fibonacci numbers are fun too
 
23
(defun fibonacci (N)
 
24
  (if (or (zerop N) (= N 1))
 
25
      1
 
26
    (+ (fibonacci (- N 1)) (fibonacci (- N 2)))))