about summary refs log tree commit diff stats
path: root/js/scripting-lang/scratch_tests/test_pattern_part1.txt
diff options
context:
space:
mode:
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_pattern_part1.txt')
-rw-r--r--js/scripting-lang/scratch_tests/test_pattern_part1.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/js/scripting-lang/scratch_tests/test_pattern_part1.txt b/js/scripting-lang/scratch_tests/test_pattern_part1.txt
new file mode 100644
index 0000000..60af053
--- /dev/null
+++ b/js/scripting-lang/scratch_tests/test_pattern_part1.txt
@@ -0,0 +1,12 @@
+/* Integration Test: Pattern Matching */
+/* Combines: case expressions, functions, recursion, complex patterns */
+
+..out "=== Integration Test: Pattern Matching ===";
+
+/* Recursive factorial with case expressions */
+factorial : n -> 
+  when n is
+    0 then 1
+    _ then n * (factorial (n - 1));
+
+..out "factorial function created successfully"; 
\ No newline at end of file