diff options
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_factorial_fixed.txt')
-rw-r--r-- | js/scripting-lang/scratch_tests/test_factorial_fixed.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/js/scripting-lang/scratch_tests/test_factorial_fixed.txt b/js/scripting-lang/scratch_tests/test_factorial_fixed.txt new file mode 100644 index 0000000..db0ec5f --- /dev/null +++ b/js/scripting-lang/scratch_tests/test_factorial_fixed.txt @@ -0,0 +1,8 @@ +/* Test factorial function with @ operator */ +factorial : n -> + when n is + 0 then 1 + _ then n * (@factorial (n - 1)); + +result : factorial 5; +..out result; \ No newline at end of file |