modal/examples/string_join.modal

11 lines
322 B
Plaintext
Raw Permalink Normal View History

2024-04-16 20:17:11 +01:00
?(?-) (This example joins two tokens.)
<> (join (?a) (?*)) (join reverse (?a) List (?*))
2024-04-17 18:56:51 +01:00
<> (join List () List ?^) (?^)
2024-04-16 20:17:11 +01:00
<> (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)