about summary refs log tree commit diff stats
path: root/js/scripting-lang/scratch_tests/test_func_calls_only.txt
diff options
context:
space:
mode:
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_func_calls_only.txt')
-rw-r--r--js/scripting-lang/scratch_tests/test_func_calls_only.txt17
1 files changed, 17 insertions, 0 deletions
diff --git a/js/scripting-lang/scratch_tests/test_func_calls_only.txt b/js/scripting-lang/scratch_tests/test_func_calls_only.txt
new file mode 100644
index 0000000..f217d60
--- /dev/null
+++ b/js/scripting-lang/scratch_tests/test_func_calls_only.txt
@@ -0,0 +1,17 @@
+/* Test just the function calls section */
+
+/* Helper functions for testing */
+is_even : n -> n % 2 = 0;
+
+/* Number classification using function calls in patterns */
+classify_number : n ->
+  when (is_even n) is
+    true then "even number"
+    false then "odd number";
+
+/* Test number classification */
+even_class : classify_number 4;
+odd_class : classify_number 7;
+
+..out even_class;
+..out odd_class; 
\ No newline at end of file