For this function,showGame, and the expected output, anyone can give me a hand to make this work ?
import System.IO
type Symbol = Int
showGame :: [Symbol] => IO ()
showGame xs =
let x = mapM_ (replicate '*') xs
putStrLn x
The output should be:
1: *
2: **
3: ***
with
[Symbol] = [1,2,3]
showin Haskell typically provide aStringrather than an IO action. You might want to name thisprintGameinstead.