From d1f378b7ed770f1ad78eb3e748f6ebc6c7024ef3 Mon Sep 17 00:00:00 2001 From: Rose Hogenson Date: Tue, 11 Jan 2022 19:49:48 -0800 Subject: Add guards to the match syntax. I'm not sure the syntax is great, but it's very helpful to have. --- match-test.csc | 10 ++++++++++ 1 file changed, 10 insertions(+) (limited to 'match-test.csc') diff --git a/match-test.csc b/match-test.csc index 73daa58..bbecce4 100644 --- a/match-test.csc +++ b/match-test.csc @@ -66,3 +66,13 @@ ((! 'a) 1) ((! 'b) 2) (_ 3)))) + + +(test match-when + (assert-equal + 3 + (match 'b + ((! 'a) 1) + ((! 'b) (when #f) 2) + ((! 'b) 3) + (_ 4)))) -- cgit v1.3.1