Hi,
I was following along with Dr. Meijer's Functional Programming Fundamentals Chapter 9 but came across a compile error in Hugs that I didn't understand, especially since I thought that I entered the program exactly as Dr. Meijer did (which can be seen at time 9:53 in the video).
The program that is causing the error is as follows:
getchar :: IO Char
return :: a -> IO a
a :: IO (Char, Char)
a = do x <- getChar
getChar
y <- getChar
return (x,y)
The error that is returned is:
"Last generator in do {...} must be an expression"
Can someone tell me if I am missing something?
Add your 2¢