aboutsummaryrefslogtreecommitdiffstats
path: root/progs/tests/func/passing_functions_as_arguments.sy
diff options
context:
space:
mode:
Diffstat (limited to 'progs/tests/func/passing_functions_as_arguments.sy')
-rw-r--r--progs/tests/func/passing_functions_as_arguments.sy9
1 files changed, 9 insertions, 0 deletions
diff --git a/progs/tests/func/passing_functions_as_arguments.sy b/progs/tests/func/passing_functions_as_arguments.sy
new file mode 100644
index 0000000..e09a125
--- /dev/null
+++ b/progs/tests/func/passing_functions_as_arguments.sy
@@ -0,0 +1,9 @@
+start :: fn {
+ g := fn -> int {
+ ret 1
+ }
+ f := fn inner: fn -> int -> int {
+ ret inner()
+ }
+ f(g) <=> 1
+}