Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

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 :)




Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: