aboutsummaryrefslogtreecommitdiffstats
path: root/test
diff options
context:
space:
mode:
Diffstat (limited to 'test')
-rw-r--r--test/match.resp14
1 files changed, 5 insertions, 9 deletions
diff --git a/test/match.resp b/test/match.resp
index b50257a..0d490ec 100644
--- a/test/match.resp
+++ b/test/match.resp
@@ -1,14 +1,10 @@
(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))
+(def s1 (Circle 2.0))
+(def s2 (Rectangle 3.0 4.0))
-(match r1
- (Circle r) "Hello, circle!"
- (Square w) "Hello, square!"
- (Rectangle w h) "Hello, rectangle!")
+(match s2
+ (Rectangle w h) (* w h)
+ (Circle r) (* 3.14159 r))