[1 of 1] Compiling Main ( prog.hs, prog.o )
prog.hs:10:9: error:
• Couldn't match type ‘IO [Int]’ with ‘[Int]’
Expected type: IO [Int]
Actual type: IO (IO [Int])
• In a stmt of a 'do' block: return (shuffle (i - 1) flipped)
In the expression:
do { n <- getStdRandom $ randomR (0, (length xs) - 1) :: IO Int;
let part1 = take n xs
part2 = drop (n + 1) xs
....;
return (shuffle (i - 1) flipped) }
In an equation for ‘shuffle’:
shuffle i xs
= do { n <- getStdRandom $ randomR (0, (length xs) - 1) :: IO Int;
let part1 = ...
....;
return (shuffle (i - 1) flipped) }