modal/examples/tests.modal

21 lines
403 B
Plaintext

?(?-) (This example tests various aspects of the implementation.)
<> (?: print) (?:)
<> (?x = ?x test) (#ok)
<> (?x = ?y test) (#fail)
?(?-) (Basic register setups)
<> (dup (?x)) ((?x ?x) =)
<> (swap (?x ?y)) ((?y ?x) =)
<> (compare (?x ?x ?x)) ((#t) =)
dup (abc) (abc abc) test
swap (abc def) (def abc) test
compare (abc abc abc) (#t) test
?(?-) (Lambdas)
?((?x) ((?x ?x) =)) abc (abc abc) test