From 6eebd55535254e82230ce0ad11f7eb8b7907a9ca Mon Sep 17 00:00:00 2001 From: Eduardo Julian Date: Fri, 26 Dec 2014 14:36:22 -0400 Subject: Added string testing & multi-branching to pattern-matching. --- test2.lang | 7 ++++++- 1 file changed, 6 insertions(+), 1 deletion(-) (limited to 'test2.lang') diff --git a/test2.lang b/test2.lang index 55d7a14af..73c6d206e 100644 --- a/test2.lang +++ b/test2.lang @@ -30,8 +30,13 @@ (if true (let xs+ys (#Cons "Pattern" (#Cons "Matching" #Nil)) (case xs+ys + (#Cons "Pattern" (#Cons second #Nil)) + (do (:: (:: System out) (println "Branch #1")) + (:: (:: System out) (println second))) + (#Cons first (#Cons second #Nil)) - (do (:: (:: System out) (println first)) + (do (:: (:: System out) (println "Branch #2")) + (:: (:: System out) (println first)) (:: (:: System out) (println second))))) (:: (:: System out) (println "FALSE")))) -- cgit v1.2.3