From 0be295a237ff0b7941b56c4f863d20fec052b8d4 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Sun, 21 Apr 2024 16:47:27 -0700 Subject: [PATCH] Added sierpinski to examples/ --- examples/sierpinski.modal | 21 +++++++++++++++++++++ 1 file changed, 21 insertions(+) create mode 100644 examples/sierpinski.modal diff --git a/examples/sierpinski.modal b/examples/sierpinski.modal new file mode 100644 index 0000000..a5781e6 --- /dev/null +++ b/examples/sierpinski.modal @@ -0,0 +1,21 @@ +?(?-) (Rules) + +<> (* (. > (. ?x))) (* (. (. > ?x))) +<> (. (. > (* ?x))) (* (. (* > ?x))) + +?(?-) (Physics) + +<> (Tri > (?x ?y)) (Tri (?x > ?y)) +<> (Tri (?x > (?y ?z))) (Tri (?x (?y > ?z))) +<> (?x (?y > (?z ?n))) (. (?y (?z > ?n))) +<> ((?x > ())) (< ()) +<> (Tri < (* ?^)) (?(?: ?:) (*?^)) +<> ((?x < ?y)) (< (?x ?y)) + +?(?-) (Print) + +<> (Tri.join ?x ?:) (Tri > ?x ?:) +<> (Tri.dup ?x ?^) (Tri.join ?x ?^) +<> (Tri < ?x) (Tri.dup (. ?x) (?x \n)) + +Tri < (. (. (. (. (. (. (. (. (. (. (. (. (. (. (. (* (. (. (. (. (. (. (. (. (. (. (. (. (. (. (. ()))))))))))))))))))))))))))))))) \ No newline at end of file