*** empty log message ***
This commit is contained in:
@ -1,4 +1,5 @@
|
||||
(setq x (lambda (x) (+ x 20 30 40)))
|
||||
;(setq x (lambda (x) (+ x 20 30 40)))
|
||||
(defun x(x) (+ x 20 30 40))
|
||||
(x 100)
|
||||
(x 100)
|
||||
(x 100)
|
||||
|
8
ase/test/lsp/t3.lsp
Normal file
8
ase/test/lsp/t3.lsp
Normal file
@ -0,0 +1,8 @@
|
||||
; test while
|
||||
|
||||
(setq x 10)
|
||||
(setq y 10)
|
||||
(while (< x 100) (setq y (+ x y)) (setq x (+ x 1)))
|
||||
x
|
||||
y
|
||||
|
7
ase/test/lsp/t4.lsp
Normal file
7
ase/test/lsp/t4.lsp
Normal file
@ -0,0 +1,7 @@
|
||||
;Compute the factorial of N.
|
||||
(defun factorial (N)
|
||||
(if (= N 1)
|
||||
1
|
||||
(* N (factorial (- N 1)))))
|
||||
|
||||
(factorial 10)
|
7
ase/test/lsp/t5.lsp
Normal file
7
ase/test/lsp/t5.lsp
Normal file
@ -0,0 +1,7 @@
|
||||
; Compute the N'th Fibonacci number.
|
||||
(defun fibonacci (N)
|
||||
(if (or (zerop N) (= N 1))
|
||||
1
|
||||
(+ (fibonacci (- N 1)) (fibonacci (- N 2)))))
|
||||
|
||||
(fibonacci 5)
|
Reference in New Issue
Block a user