Skip to content

Instantly share code, notes, and snippets.

View etiago's full-sized avatar

Tiago Espinha etiago

View GitHub Profile
@etiago
etiago / Passport.h
Last active May 9, 2021 10:14
Puzzle 4
#ifndef EXPERIMENTS_PASSPORT_H
#define EXPERIMENTS_PASSPORT_H
#include <boost/optional.hpp>
#include <string>
#include <utility>
using namespace std;
struct Passport {
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