From 44e809f092fa6d0bef7b2a0b5dd219b45c5ff1a3 Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Wed, 17 Apr 2024 10:56:51 -0700 Subject: [PATCH] Updated tests to match new registers --- examples/string_join.modal | 2 +- examples/string_reverse.modal | 2 +- examples/tests.modal | 6 ++++-- 3 files changed, 6 insertions(+), 4 deletions(-) diff --git a/examples/string_join.modal b/examples/string_join.modal index 8f4b8ea..eb3193e 100644 --- a/examples/string_join.modal +++ b/examples/string_join.modal @@ -1,7 +1,7 @@ ?(?-) (This example joins two tokens.) <> (join (?a) (?*)) (join reverse (?a) List (?*)) -<> (join List () List ?*) (?*) +<> (join List () List ?^) (?^) <> (join List (?x ?y) List ?z) (join List ?y List (?x ?z)) <> (reverse List ()) (List) diff --git a/examples/string_reverse.modal b/examples/string_reverse.modal index 4e14c75..a973a80 100644 --- a/examples/string_reverse.modal +++ b/examples/string_reverse.modal @@ -1,6 +1,6 @@ ?(?-) (This example reverses the string modal, into ladom.) -<> (reverse List () ?*) (?*) +<> (reverse List () ?^) (?^) <> (reverse (?*)) (reverse List (?*) ()) <> (reverse List (?x ?y) ?z) (reverse List ?y (?x ?z)) diff --git a/examples/tests.modal b/examples/tests.modal index 9d6d20a..4fb6d80 100644 --- a/examples/tests.modal +++ b/examples/tests.modal @@ -57,16 +57,18 @@ abc ?(?x) def = abc test <> (explode ?*) ((?*) =) explode cow (c (o (w ()))) test +explode (12 34 45) (12 (34 (45 ()))) test ?(?-) (Implode) -<> (implode ?*) (?* =) +<> (implode ?^) (?^ =) implode (b (a (t ()))) bat test +implode (12 (34 (56 ()))) 123456 test ?(?-) (List reversal) -<> (reverse List () ?*) (?*) +<> (reverse List () ?^) (?^) <> (reverse (?*)) (reverse List (?*) ()) <> (reverse List (?x ?y) ?z) (reverse List ?y (?x ?z))