Comment on Functional Programming 101 with HaskellparentComments−coolsunglasses12yYou're using the REPL, where every operation is basically happening in a do monad.If you get an error like that where you intend to define something, use let.like: let sumOfElements [] = 0−gizmo68612yI believe you mean that every operation is happening in the IO monad, and you input is being interpreted as if it was in a do block.−coolsunglasses12ySorry, yes, misspoke (so to speak) because I had friends waiting for me to queue a Dota 2 game :)
Comments
You're using the REPL, where every operation is basically happening in a do monad.
If you get an error like that where you intend to define something, use let.
like: let sumOfElements [] = 0
I believe you mean that every operation is happening in the IO monad, and you input is being interpreted as if it was in a do block.
Sorry, yes, misspoke (so to speak) because I had friends waiting for me to queue a Dota 2 game :)