This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#ifndef EXPERIMENTS_PASSPORT_H | |
#define EXPERIMENTS_PASSPORT_H | |
#include <boost/optional.hpp> | |
#include <string> | |
#include <utility> | |
using namespace std; | |
struct Passport { |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
type Hangman = Char | |
singleton :: Char -> Hangman | |
singleton c = c | |
hangmanStdio :: Hangman -> IO() | |
hangmanStdio h = do | |
putStrLn "Guess the character" | |
l <- getLine | |
let c = toLower $ head l | |
if h == c |