modal/examples/string_join.modal

11 lines
322 B
Plaintext
Raw Normal View History

2024-04-16 15:17:11 -04:00
?(?-) (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)