| 1 |
;;; testing.lisp |
| 2 |
;;; by Philip Fong |
| 3 |
;;; |
| 4 |
;;; Introductory comments are preceded by ";;;" |
| 5 |
;;; Function headers are preceded by ";;" |
| 6 |
;;; Inline comments are introduced by ";" |
| 7 |
;;; |
| 8 |
|
| 9 |
;; |
| 10 |
;; Triple the value of a number |
| 11 |
;; |
| 12 |
|
| 13 |
(defun triple (X) |
| 14 |
"Compute three times X." ; Inline comments can |
| 15 |
(* 3 X)) ; be placed here. |
| 16 |
|
| 17 |
;; |
| 18 |
;; Negate the sign of a number |
| 19 |
;; |
| 20 |
|
| 21 |
(defun negate (X) |
| 22 |
"Negate the value of X." ; This is a documentation string. |
| 23 |
(- X)) |
| 24 |
|
| 25 |
;;; From https://www2.cs.sfu.ca/CourseCentral/310/pwfong/Lisp/1/tutorial1.html |
| 26 |
|