Skip to content

Comment on Functional Programming 101 with Haskellparent

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

AboutSource Built by g1lg1l

Hackerly is an independent reader for Hacker News, built on the public HN API. Not affiliated with Y Combinator.