pattern matching for "x"*

This commit is contained in:
krangelov
2021-09-29 14:57:18 +02:00
parent edd7081dea
commit 6efb878c43
11 changed files with 44 additions and 19 deletions

View File

@@ -21,3 +21,5 @@ cc <case "abc def ghi" of {"ab"+x => x; _ => "?"} : Str>
cc <case "abc def ghi" of {x+"hi" => x; _ => "?"} : Str>
cc <case "abcdefghi" of {""+x => x; _ => "?"} : Str>
cc <case "abcdefghi" of {x+"" => x; _ => "?"} : Str>
cc <case "aaaaxy" of {"a"* + x => x; _ => "?"} : Str>
cc <case "xybbbbb" of {x + "b"* => x; _ => "?"} : Str>

View File

@@ -20,3 +20,5 @@ param_table.Q2
"abc" ++ "def" ++ "g"
"abcdefghi"
"abcdefghi"
"aaaaxy"
"xy"