#t and #f added to language, datetime fixes

This commit is contained in:
2021-10-12 13:26:38 +02:00
parent adca8a452b
commit 4359012190
13 changed files with 90 additions and 55 deletions

View File

@@ -1,5 +1,5 @@
; not a bool
(defun not (x) (if x nil 1))
(defun not (x) (if x nil #t))
(defun is-pos? (n) (> n nil))
(defun is-neg? (n) (< n nil))
@@ -70,13 +70,13 @@
(while (and (< i lst_len) (= found_index -1))
(if (= itm (index lst i))
(define found_index i)
(define i (+ i 1))
(set! found_index i)
(set! i (+ i 1))
))
; TODO when nil will be implemented itm / nil
(if (!= -1 found_index)
1
#t
nil)
))