Add or and and

This commit is contained in:
Scott Richmond 2022-05-24 17:29:06 -04:00
parent 1ca434b308
commit 372103a3ee

View File

@ -3,10 +3,20 @@
[ludus.data :as data]
[ludus.show]))
(defn- id [x] x)
(def eq {:name "eq"
::data/type ::data/clj
:body =})
(def and- {:name "and"
::data/type ::data/clj
:body (fn [&args] (every? id &args))})
(def or- {:name "or"
::data/type ::data/clj
:body (fn [&args] (some id &args))})
(def add {:name "add"
::data/type ::data/clj
:body +})
@ -78,4 +88,6 @@
"show" show
"deref" deref-
"set!" set!-
"and" and-
"or" or-
})