aboutsummaryrefslogtreecommitdiff
path: root/src/prelude.lisp
blob: 7b499770d661ed656e7a7445b33a675c2eaefd88 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
(defvar nil '())

(defvar pi 3.1415926)

(defmacro incq (i)
  `(setq ,i (+ ,i 1)))

(defmacro decq (i)
  `(setq ,i (- ,i 1)))

(defun zerop (x) (= x 0))

(defmacro when (pred . body)
  `(if ,pred
     (progn ,@body)
     nil))

(defmacro unless (pred . body)
  `(if ,pred
     nil
     (progn ,@body)))