diff --git a/examples/tests.modal b/examples/tests.modal index fdb8b22..571ea74 100644 --- a/examples/tests.modal +++ b/examples/tests.modal @@ -4,6 +4,13 @@ <> (?x = ?x test) (#ok) <> (?x = ?y test) (#fail) +?(?-) (Inline rules) + +<> ((?x -> ?y)) (<> ?x ?y) +(nap -> (tap =)) + +nap tap test + ?(?-) (Empty replacements) <> (?x pop-plain) @@ -50,3 +57,11 @@ explode cow (c (o (w ()))) test <> (implode ?*) (?* =) implode (b (a (t ()))) bat test + +?(?-) (List reversal) + +<> (reverse List () ?*) (?*) +<> (reverse (?*)) (reverse List (?*) ()) +<> (reverse List (?x ?y) ?z) (reverse List ?y (?x ?z)) + +reverse (modal) = ladom test