Safe Haskell | None |
---|---|
Language | Haskell2010 |
Chapter8
Synopsis
- data Move
- convertToMove :: Integer -> Move
- convertMove :: Char -> Move
- outcome :: Move -> Move -> Integer
- tournamentOutcome :: Tournament -> Integer
- beat :: Move -> Move
- lose :: Move -> Move
- prop_WinLose :: Move -> Bool
- type Strategy = [Move] -> Move
- randomStrategy :: Strategy
- sConst :: Move -> Strategy
- rock :: Strategy
- paper :: Strategy
- scissors :: Strategy
- cycle :: Strategy
- sLostLast :: Move -> Strategy
- echo :: Move -> Strategy
- sToss :: Strategy -> Strategy -> Strategy
- randomInt :: Integer -> IO Integer
- randInt :: Integer -> Integer
- helloWorld :: IO ()
- put4times :: String -> IO ()
- putNtimes :: Integer -> String -> IO ()
- read2lines :: IO ()
- getNput :: IO ()
- reverse2lines :: IO ()
- reverse2lines' :: IO ()
- getInt :: IO Integer
- readWrite :: IO ()
- readEcho :: IO ()
- sumInts :: Integer -> IO Integer
- sumInteract :: IO ()
- copyEOF :: IO ()
- copyInteract :: IO ()
- copy :: IO ()
- copyEmpty :: IO ()
- copyCount :: Integer -> IO ()
- copyN :: Integer -> IO ()
- copyWrong :: IO ()
- type Tournament = ([Move], [Move])
- result :: Tournament -> Integer
- step :: Strategy -> Strategy -> Tournament -> Tournament
- playSvsS :: Strategy -> Strategy -> Integer -> Tournament
- play :: Strategy -> IO ()
- playInteractive :: Strategy -> Tournament -> IO ()
- showResults :: Tournament -> IO ()
- randomPlay :: IO ()
Documentation
convertToMove :: Integer -> Move Source #
convertMove :: Char -> Move Source #
prop_WinLose :: Move -> Bool Source #
helloWorld :: IO () Source #
^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^^
read2lines :: IO () Source #
reverse2lines :: IO () Source #
reverse2lines' :: IO () Source #
sumInteract :: IO () Source #
copyInteract :: IO () Source #
type Tournament = ([Move], [Move]) Source #
result :: Tournament -> Integer Source #
step :: Strategy -> Strategy -> Tournament -> Tournament Source #
playInteractive :: Strategy -> Tournament -> IO () Source #
showResults :: Tournament -> IO () Source #
randomPlay :: IO () Source #