diff options
Diffstat (limited to 'test')
-rw-r--r-- | test/match.resp | 14 |
1 files changed, 9 insertions, 5 deletions
diff --git a/test/match.resp b/test/match.resp index 0d490ec..7f1c9dc 100644 --- a/test/match.resp +++ b/test/match.resp @@ -2,9 +2,13 @@ (Circle Float) (Rectangle Float Float)) -(def s1 (Circle 2.0)) -(def s2 (Rectangle 3.0 4.0)) +(def (area s) + (match s + (Rectangle w h) (* w h) + (Circle r) (* 3.14159 r))) -(match s2 - (Rectangle w h) (* w h) - (Circle r) (* 3.14159 r)) + +;(area (Circle 2.0)) + +(def s (Circle 2.0)) +(area s)
\ No newline at end of file |