1 2 3 4 5 6 | import Control.Monad readLines = do input <- getLine inputs <- replicateM (read input) (getLine) return (inputs) |
5:43: Error: Redundant bracket
Found:
(getLine)
Why not:
getLine
6:16: Error: Redundant bracket
Found:
(inputs)
Why not:
inputs
1 2 3 4 5 6 | import Control.Monad readLines = do input <- getLine inputs <- replicateM (read input) getLine inputs |
3:13: Error: Use join
Found:
do input <- getLine
inputs <- replicateM (read input) getLine
inputs
Why not:
do input <- getLine
join (replicateM (read input) getLine)