aboutsummaryrefslogtreecommitdiffhomepage
path: root/samples/fun/gen.bruijn
diff options
context:
space:
mode:
authorMarvin Borner2023-03-12 00:04:55 +0100
committerMarvin Borner2023-03-12 00:08:37 +0100
commit5e5069c5228f2cd39de38ace9134f57293cc7e5d (patch)
tree525f3a12f8ae5a8d093c756ac5a094a9ccedfe78 /samples/fun/gen.bruijn
parente789e11f8e478fe5987101424cf5c9c32cc6a29b (diff)
Fun
Diffstat (limited to 'samples/fun/gen.bruijn')
-rw-r--r--samples/fun/gen.bruijn12
1 files changed, 12 insertions, 0 deletions
diff --git a/samples/fun/gen.bruijn b/samples/fun/gen.bruijn
new file mode 100644
index 0000000..1333baa
--- /dev/null
+++ b/samples/fun/gen.bruijn
@@ -0,0 +1,12 @@
+# generates long expressions from short ones
+
+# TODO: This should be linear time according to RKNL paper
+# possible reasons: box/map copying, GC
+
+:import std/Math .
+
+seed (+23u)
+
+dup [0 0]
+
+main [seed dup 0] ⧗ Unary → Woah