diff options
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_simple_function.txt')
-rw-r--r-- | js/scripting-lang/scratch_tests/test_simple_function.txt | 19 |
1 files changed, 7 insertions, 12 deletions
diff --git a/js/scripting-lang/scratch_tests/test_simple_function.txt b/js/scripting-lang/scratch_tests/test_simple_function.txt index d7929d6..3f8ece7 100644 --- a/js/scripting-lang/scratch_tests/test_simple_function.txt +++ b/js/scripting-lang/scratch_tests/test_simple_function.txt @@ -1,14 +1,9 @@ -/* Simple function application test */ +/* Simple function test */ -x : 5; -f : x -> x * 2; -g : x -> x + 1; +// Just create a function +simple_func : x -> x; -/* Test 1: Simple function application */ -result1 : f x; /* Should be apply(f, x) = 10 */ - -/* Test 2: Function composition */ -result2 : f g x; /* Should be apply(f, apply(g, x)) = 12 */ - -/* Test 3: Multiple arguments */ -result3 : f g 3; /* Should be apply(f, apply(g, 3)) = 8 */ \ No newline at end of file +// Test it +..out "=== SIMPLE FUNCTION TEST ==="; +result : simple_func 5; +..out result; \ No newline at end of file |