I'm going through the book Natural Language Processing for Working Programmers. The book uses Haskell, which I don't have much experience with. The code below throws an error in GHCI
:{
do
l <- [0..9]
ps <- (\x -> [x-1, x+2]) l
return ps
:}
This is the error message returned
The last statement in a 'do' construct must be an expression
All answers I've come across seem to suggest it is an indentation error, but as far as I can tell the indentation seems correct. Any ideas what the problem could be?