I cannot understand the following code very well as i donot know the
definition of "satisfy" and "".
-- | Case-insensitive variant of Parsec's 'char' function.
caseChar:: Char -> GenParser Char a Char
caseChar c = satisfy (\x -> toUpper x == toUpper c)
-- | Case-insensitive varian
Hi, friends
rollDice :: Word8 -> IO Word8
rollDice n = do
bracket (openFile "/dev/random" ReadMode) (hClose)
(\hd -> do v <- fmap B.unpack (B.hGet hd 1)
let v1 = Data.List.head v
return $ (v1 `mod` n) + 1)
.
blueIdx <- rollDice $ length [1..33]