From dba4ea41ce332f6945e61f580aee675a50a9b237 Mon Sep 17 00:00:00 2001 From: Marvin Borner Date: Fri, 7 Jun 2024 13:31:29 +0200 Subject: Some more work on monads --- samples/fun/IO.bruijn | 6 ++++++ 1 file changed, 6 insertions(+) create mode 100644 samples/fun/IO.bruijn (limited to 'samples/fun/IO.bruijn') 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]]] -- cgit v1.2.3