and and or added

This commit is contained in:
2021-03-28 13:37:54 +02:00
parent b0ff9dd934
commit 337fb2f80d
2 changed files with 23 additions and 7 deletions

View File

@@ -1,13 +1,6 @@
; not a bool
(defun not (x) (if x 0 1))
; logical and
(defun and (a b) (if a (if b 1 0) 0))
; logical or
(defun or (a b) (if a 1 (if b 1 0)))
; negate a number
(defun neg (n) (- 0 n))