I get this error in GHCI:
*** Exception: <stdin>: hGetLine: illegal operation (handle is semi-closed)
After running this code:
main = do
interact $ unlines . fmap proccess . take x . lines
readLn :: IO Int
And I'm sure the reason take x. Is there a better way to read only x lines using interaction, or is it interactjust a solo player?
source
share