diff options
author | Marvin Borner | 2024-06-07 13:31:29 +0200 |
---|---|---|
committer | Marvin Borner | 2024-06-07 14:37:52 +0200 |
commit | dba4ea41ce332f6945e61f580aee675a50a9b237 (patch) | |
tree | d715dfd711103adec2bb5bfed7e3520c9d7285a4 /std/IO.bruijn | |
parent | eb21453b1491b602db9ae2076c6caea4f866d7d8 (diff) |
Some more work on monads
Diffstat (limited to 'std/IO.bruijn')
-rw-r--r-- | std/IO.bruijn | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/std/IO.bruijn b/std/IO.bruijn new file mode 100644 index 0000000..fdc9295 --- /dev/null +++ b/std/IO.bruijn @@ -0,0 +1,12 @@ +# MIT License, Copyright (c) 2024 Marvin Borner + +:input std/Monad/List . + +:import std/Char C +:import std/Combinator . + +# reads a single char monadically +get-char read + +# reads a line monadically +get-line y [read >>= [(C.eq? 0 '\n') (pure [[0]]) (1 >>= [pure [0 2 1]])]] |