about summary refs log tree commit diff
path: root/examples/11.pry
diff options
context:
space:
mode:
Diffstat (limited to 'examples/11.pry')
-rw-r--r--examples/11.pry26
1 files changed, 26 insertions, 0 deletions
diff --git a/examples/11.pry b/examples/11.pry
new file mode 100644
index 0000000..2349f10
--- /dev/null
+++ b/examples/11.pry
@@ -0,0 +1,26 @@
+import "!stdlib.pry";
+
+let id = (a: i64) => i64 {
+	printf("%d\n", a);
+	printf("%d\n", 12);
+	return a;
+};
+
+let main = () => i64 {
+	let y = (f: (i64) => i64, x: i64) => i64 {
+		return f(x);
+	};
+
+	return y(id, 2);
+};
+
+/*
+
+Expected stdout:
+
+2
+12
+
+Expected return: 2
+
+*/