Added sierpinski to examples/

This commit is contained in:
Devine Lu Linvega 2024-04-21 16:47:27 -07:00
parent ed5c0763e2
commit 0be295a237
1 changed files with 21 additions and 0 deletions

21
examples/sierpinski.modal Normal file
View File

@ -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 < (. (. (. (. (. (. (. (. (. (. (. (. (. (. (. (* (. (. (. (. (. (. (. (. (. (. (. (. (. (. (. ())))))))))))))))))))))))))))))))