Created
April 16, 2017 05:07
-
-
Save Cedev/b55e8bba2d6a33f5023385addbf51c3e to your computer and use it in GitHub Desktop.
nested dos
This file contains 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
main = do | |
chars <- getLine | |
let otherchars = do | |
a <- chars | |
b <- chars | |
[a] ++ [b] | |
putStrLn otherchars |
Notice it would be much nicer if the let x = y in z
syntax was just x = y; z
. Also do
could be used to avoid {}
, I guess. So,
main =
chars = #getLine
otherChargs = do
a = #chars
b = #chars
a ++ b
putStrLn otherChars
In an ideal world?
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Edit: this is a type error though,
chars :: String
, but I get what you mean. The{}
makes it desugar in the proper block.