aboutsummaryrefslogtreecommitdiffhomepage
path: root/samples/io/echo.bruijn
diff options
context:
space:
mode:
Diffstat (limited to 'samples/io/echo.bruijn')
-rw-r--r--samples/io/echo.bruijn5
1 files changed, 5 insertions, 0 deletions
diff --git a/samples/io/echo.bruijn b/samples/io/echo.bruijn
index 192bab1..b17bda1 100644
--- a/samples/io/echo.bruijn
+++ b/samples/io/echo.bruijn
@@ -1,4 +1,9 @@
# "echo text | bruijn echo.bruijn"
+:import std/Monad .
+
# returning the binary encoded argument ⇒ echo
main [0]
+
+# alternative using monads
+main* read >>= return