about summary refs log tree commit diff stats
path: root/js/scripting-lang/scratch_tests/test_compose_order.txt
diff options
context:
space:
mode:
Diffstat (limited to 'js/scripting-lang/scratch_tests/test_compose_order.txt')
-rw-r--r--js/scripting-lang/scratch_tests/test_compose_order.txt12
1 files changed, 12 insertions, 0 deletions
diff --git a/js/scripting-lang/scratch_tests/test_compose_order.txt b/js/scripting-lang/scratch_tests/test_compose_order.txt
new file mode 100644
index 0000000..2866a6d
--- /dev/null
+++ b/js/scripting-lang/scratch_tests/test_compose_order.txt
@@ -0,0 +1,12 @@
+/* Test compose function order */
+
+/* Create functions that show the order */
+first : x -> x * 10;
+second : x -> x + 1;
+
+/* Test composition */
+composed : compose(first, second);
+result : composed 5;
+..out result;
+
+/* Expected: first(second(5)) = first(6) = 60 */ 
\ No newline at end of file