diff options
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_nested_when.txt')
-rw-r--r-- | js/scripting-lang/scratch_tests/test_nested_when.txt | 11 |
1 files changed, 11 insertions, 0 deletions
diff --git a/js/scripting-lang/scratch_tests/test_nested_when.txt b/js/scripting-lang/scratch_tests/test_nested_when.txt new file mode 100644 index 0000000..b39c370 --- /dev/null +++ b/js/scripting-lang/scratch_tests/test_nested_when.txt @@ -0,0 +1,11 @@ +/* Test nested when expressions */ +classify : x y -> + when x y is + 0 0 then "both zero" + 0 _ then "x is zero" + _ 0 then "y is zero" + _ _ then when x is + 0 then "x is zero (nested)" + _ then "neither zero"; + +..out "nested when expression created successfully"; \ No newline at end of file |