Created
November 26, 2012 19:56
-
-
Save raimohanska/4150252 to your computer and use it in GitHub Desktop.
Roy Monad syntax bug
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
let ioMonad = { | |
return: \x -> (\() -> x) | |
bind: \action f -> (\() -> | |
let value = action () | |
let action2 = f value | |
action2 () | |
) | |
} | |
let putStrLn line = (\() -> console.log line) | |
let main = do ioMonad | |
_ <- putStrLn "a" | |
putStrLn "b" | |
main () |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
If line 13 was just
The letter "a" doesn't get printed.