Hello great programmers out there,
I\'m doing my first steps in haskell and have a function that confuses me:
import Data.List.Split
getncheck_guessl
When you're writing a function that uses the IO monad, any value you want to return from the function must also be in the IO monad.
This means that, instead of returning a value with type [Int], you have to return something with type IO [Int]. To do this, you use the return function, which "wraps up" the value into IO (it actually works for any monad).
Just change the last line to wrap your value with return, like this:
getncheck_guesslist = do
line <- getLine
let tmp = splitOneOf ",;" line
return (map read tmp :: [Int])