modal/examples/sierpinski.modal

50 lines
1.7 KiB
Plaintext
Raw Normal View History

2024-04-13 19:12:55 -04:00
<> (written by) (capital)
<> (?: print) (?:)
<> (?* explode) ((List (?*)))
<> ((List ?*) implode) (?*)
<> (MkEmpty) (_________________________________ explode)
<> ((List (?1 (?2 ?l))) MkWindow) ((Window (?1 ?2) ?l))
<> ((Window (?1 ?2) ( )) roll) ((WindowExhausted))
<> ((Window (?1 ?2) (?3 )) roll) ((Window (?1 ?2 ?3) ()))
<> ((Window (?1 ?2) (?3 ?l)) roll) ((Window (?1 ?2 ?3) ?l))
<> ((Window (?1 ?2 ?3) ( )) roll) ((Window (?2 ?3 ) ()))
<> ((Window (?1 ?2 ?3) (?4 )) roll) ((Window (?2 ?3 ?4) ()))
<> ((Window (?1 ?2 ?3) (?4 ?l)) roll) ((Window (?2 ?3 ?4) ?l))
<> (?p apply-rule) ((Rule (?p explode MkWindow MkEmpty apply-rule)) implode)
<> ((Window (?1 ?2 ?3) ()) (List (?h ?t)) apply-rule) ((?1 ?2 ?3) cell-state ((?2 ?3) cell-state (Rule')))
<> ((Window ?v ?l) (List (?h ?t)) apply-rule) ( ?v cell-state ((Window ?v ?l) roll (List ?t) apply-rule))
<> (Rule (Rule' ?l)) (List ?l)
<> (?y (Rule' )) (Rule' (?y))
<> (?x (Rule' ?y)) (Rule' (?x ?y))
<> ((* * *) cell-state) (_)
<> ((* * _) cell-state) (*)
<> ((* _ *) cell-state) (_)
<> ((* _ _) cell-state) (*)
<> ((_ * *) cell-state) (*)
<> ((_ * _) cell-state) (_)
<> ((_ _ *) cell-state) (*)
<> ((_ _ _) cell-state) (_)
<> ((* _) cell-state) (*)
<> ((_ *) cell-state) (*)
<> ((_ _) cell-state) (_)
<> ((Gas ?f) ?p (?r) MkTriangle) ((Triangle ((Gas ?f) ?p (?r) build)))
<> ((Gas (?g ?f)) ?p (?r) build) (?p ((Gas ?f) ?p ?r (?r) build))
<> ((Gas (Empty)) ?p ?r build) (?p (Triangle'))
<> (Triangle (Triangle' ?l)) (List (\n ?l))
<> (?y (Triangle' )) (Triangle' (?y (\n (\n))))
<> (?x (Triangle' ?y)) (Triangle' (?x (\n ?y)))
(Gas (* (* (* (* (* (* (* (* (* (* (* (* (* (* (* (Empty))))))))))))))))) ________________*________________ (apply-rule) MkTriangle implode print