diff options
Diffstat (limited to 'test/match.resp')
-rw-r--r-- | test/match.resp | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/test/match.resp b/test/match.resp new file mode 100644 index 0000000..b50257a --- /dev/null +++ b/test/match.resp @@ -0,0 +1,14 @@ +(def-type (Shape) + (Circle Float) + (Square Float) + (Rectangle Float Float)) + +(def c1 (Circle 1.0)) +(def c2 (Circle 2.0)) +(def s1 (Square 1.0)) +(def r1 (Rectangle 1.0 1.0)) + +(match r1 + (Circle r) "Hello, circle!" + (Square w) "Hello, square!" + (Rectangle w h) "Hello, rectangle!") |