From 84de156184542a317fc88e7cdf11f28010eb0f6f Mon Sep 17 00:00:00 2001 From: Devine Lu Linvega Date: Tue, 16 Apr 2024 12:17:11 -0700 Subject: [PATCH] Added string_join example --- examples/string_join.modal | 11 +++++++++++ 1 file changed, 11 insertions(+) create mode 100644 examples/string_join.modal diff --git a/examples/string_join.modal b/examples/string_join.modal new file mode 100644 index 0000000..8f4b8ea --- /dev/null +++ b/examples/string_join.modal @@ -0,0 +1,11 @@ +?(?-) (This example joins two tokens.) + +<> (join (?a) (?*)) (join reverse (?a) List (?*)) +<> (join List () List ?*) (?*) +<> (join List (?x ?y) List ?z) (join List ?y List (?x ?z)) + +<> (reverse List ()) (List) +<> (reverse (?*)) (reverse List (?*) ()) +<> (reverse List (?x ?y) ?z) (reverse List ?y (?x ?z)) + +join (foo) (bar) \ No newline at end of file