aboutsummaryrefslogtreecommitdiff
path: root/test2.lang
diff options
context:
space:
mode:
authorEduardo Julian2014-12-26 14:36:22 -0400
committerEduardo Julian2014-12-26 14:36:22 -0400
commit6eebd55535254e82230ce0ad11f7eb8b7907a9ca (patch)
tree94d41dcbd2ce7e548faf26a6193e46d4727201a4 /test2.lang
parentdb3fecf46f602320b48e7ce82ee770a46bba7ba6 (diff)
Added string testing & multi-branching to pattern-matching.
Diffstat (limited to 'test2.lang')
-rw-r--r--test2.lang7
1 files changed, 6 insertions, 1 deletions
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"))))