and and or added
This commit is contained in:
@@ -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))
|
||||
|
||||
|
||||
Reference in New Issue
Block a user