about summary refs log tree commit diff
path: root/examples
diff options
context:
space:
mode:
authorBaitinq <[email protected]>2025-01-23 19:01:52 +0100
committerBaitinq <[email protected]>2025-01-23 19:01:52 +0100
commit9eddc1deff947029bdda430a6b52745588921c9e (patch)
tree1c938561584ca1cbd6db00132bc590d5d7bb1ab4 /examples
parentMisc: Improve example (diff)
downloadpry-lang-9eddc1deff947029bdda430a6b52745588921c9e.tar.gz
pry-lang-9eddc1deff947029bdda430a6b52745588921c9e.tar.bz2
pry-lang-9eddc1deff947029bdda430a6b52745588921c9e.zip
Example: Add functions as values example
Diffstat (limited to 'examples')
-rw-r--r--examples/11.src12
1 files changed, 12 insertions, 0 deletions
diff --git a/examples/11.src b/examples/11.src
new file mode 100644
index 0000000..a572883
--- /dev/null
+++ b/examples/11.src
@@ -0,0 +1,12 @@
+let main = () => {
+	let x = (a) => {
+		print(a);
+		return 1;
+	};
+
+	let y = (f) => {
+		return f(2);
+	};
+
+	return y(x);
+};