From 10aa9c8e4682e3200aaf3c34048b00f2f5e3c196 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Mon, 15 Apr 2024 20:39:25 -0700 Subject: [PATCH] Expanded tests --- examples/tests.modal | 15 +++++++++++++++ 1 file changed, 15 insertions(+) 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