diff options
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_combinator_solution.txt')
-rw-r--r-- | js/scripting-lang/scratch_tests/test_combinator_solution.txt | 22 |
1 files changed, 0 insertions, 22 deletions
diff --git a/js/scripting-lang/scratch_tests/test_combinator_solution.txt b/js/scripting-lang/scratch_tests/test_combinator_solution.txt deleted file mode 100644 index cc806a0..0000000 --- a/js/scripting-lang/scratch_tests/test_combinator_solution.txt +++ /dev/null @@ -1,22 +0,0 @@ -/* Test our combinator solution */ -x : 5; -y : (x); /* Should be identity(x) = 5 */ -z : (x - 1); /* Should be subtract(x, 1) = 4 */ -f : x -> x * 2; -result1 : f x; /* Should be apply(f, x) = 10 */ -result2 : (f x); /* Should be identity(apply(f, x)) = 10 */ - -/* Test recursive function */ -factorial : n -> - when n is - 0 then 1 - _ then n * (factorial (n - 1)); - -result3 : factorial 3; - -/* Print results */ -..out y; -..out z; -..out result1; -..out result2; -..out result3; \ No newline at end of file |