Why does the piece of code below produce the error parse error on input ‘putStrLn’?Also, why does the following piece of code produce the error parse error on input ‘let’?
I have a game , user vs computer and I want to randomly choose who starts the game. I have This gets a random number 0 or 1. However it is a IO Int, so I can't have an if statement comparing it to a number like
Haskell wiki has the following question:https://en.wikibooks.org/wiki/Haskell/Higher-order_functions for :: a -> (a -> Bool) -> (a -> a) -> (a -> IO ()) -> IO () for i p f job = -- ???