diff options
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_func_call_value.txt')
-rw-r--r-- | js/scripting-lang/scratch_tests/test_func_call_value.txt | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/js/scripting-lang/scratch_tests/test_func_call_value.txt b/js/scripting-lang/scratch_tests/test_func_call_value.txt new file mode 100644 index 0000000..1f222d8 --- /dev/null +++ b/js/scripting-lang/scratch_tests/test_func_call_value.txt @@ -0,0 +1,12 @@ +/* Test what the function call evaluates to */ +is_even : n -> n % 2 = 0; + +test_value : n -> + when is_even n is + is_even n then "same value" + true then "true" + false then "false" + _ then "other"; + +result : test_value 4; +..out result; \ No newline at end of file |