diff --git a/src/ludus/prelude.clj b/src/ludus/prelude.clj index cb9e45b..74bbe3d 100644 --- a/src/ludus/prelude.clj +++ b/src/ludus/prelude.clj @@ -10,9 +10,33 @@ ::data/type ::data/clj :body +}) -(def panic {:name "panic" - ::data/type ::data/clj - :body (fn [& args] (throw (ex-info "Ludus panicked!" {:args args})))}) +(def sub {:name "sub" + ::data/type ::data/clj + :body -}) + +(def mult {:name "mult" + ::data/type ::data/clj + :body *}) + +(def div {:name "div" + ::data/type ::data/clj + :body /}) + +(def inc {:name "inc" + ::data/type ::data/clj + :body inc}) + +(def dec {:name "dec" + ::data/type ::data/clj + :body dec}) + +(def ld-not {:name "not" + ::data/type ::data/clj + :body not}) + +(def panic! {:name "panic!" + ::data/type ::data/clj + :body (fn [& args] (throw (ex-info "Ludus panicked!" {:args args})))}) (def print {:name "print" ::data/type ::data/clj @@ -22,5 +46,11 @@ (def prelude {"eq" eq "add" add - "panic" panic - "print" print}) \ No newline at end of file + "panic!" panic! + "print" print + "sub" sub + "mult" mult + "div" div + "inc" inc + "dec" dec + "not" not}) \ No newline at end of file