From ca808bc09373f123514bf865a4518bebac3bbbc3 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Sun, 5 Mar 2023 14:44:40 +0100 Subject: Monadic list/io interface --- samples/io/echo.bruijn | 5 +++++ 1 file changed, 5 insertions(+) (limited to 'samples/io/echo.bruijn') 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 -- cgit v1.2.3