aboutsummaryrefslogtreecommitdiffhomepage
path: root/samples/fun/IO.bruijn
diff options
context:
space:
mode:
authorMarvin Borner2024-06-07 13:31:29 +0200
committerMarvin Borner2024-06-07 14:37:52 +0200
commitdba4ea41ce332f6945e61f580aee675a50a9b237 (patch)
treed715dfd711103adec2bb5bfed7e3520c9d7285a4 /samples/fun/IO.bruijn
parenteb21453b1491b602db9ae2076c6caea4f866d7d8 (diff)
Some more work on monads
Diffstat (limited to 'samples/fun/IO.bruijn')
-rw-r--r--samples/fun/IO.bruijn6
1 files changed, 6 insertions, 0 deletions
diff --git a/samples/fun/IO.bruijn b/samples/fun/IO.bruijn
new file mode 100644
index 0000000..725e093
--- /dev/null
+++ b/samples/fun/IO.bruijn
@@ -0,0 +1,6 @@
+# read two lines using monadic I/O
+# printf "i love\nmonads\n" | bruijn IO.bruijn
+
+:import std/IO .
+
+main read-line >>= [read-line >>= [return [0 2 1]]]