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.data :as data]
[ludus.show])) [ludus.show]))
(defn- id [x] x)
(def eq {:name "eq" (def eq {:name "eq"
::data/type ::data/clj ::data/type ::data/clj
:body =}) :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" (def add {:name "add"
::data/type ::data/clj ::data/type ::data/clj
:body +}) :body +})
@ -78,4 +88,6 @@
"show" show "show" show
"deref" deref- "deref" deref-
"set!" set!- "set!" set!-
"and" and-
"or" or-
}) })