about summary refs log tree commit diff stats
path: root/js/scripting-lang/scratch_tests/test_when_string_debug.txt
diff options
context:
space:
mode:
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_when_string_debug.txt')
-rw-r--r--js/scripting-lang/scratch_tests/test_when_string_debug.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/js/scripting-lang/scratch_tests/test_when_string_debug.txt b/js/scripting-lang/scratch_tests/test_when_string_debug.txt
new file mode 100644
index 0000000..247d3c0
--- /dev/null
+++ b/js/scripting-lang/scratch_tests/test_when_string_debug.txt
@@ -0,0 +1,12 @@
+getFunction : type -> 
+  when type is
+    "double" then @double
+    "square" then @square
+    _        then @add1;
+
+double : x -> x * 2;
+square : x -> x * x;
+add1 : x -> x + 1;
+
+result : getFunction "double";
+..out result; 
\ No newline at end of file