#include <iostream>
#include <string>
#include <set>
#include <algorithm>

#include <boost/lambda/lambda.hpp>
#include <boost/lambda/bind.hpp>
#include <boost/lambda/if.hpp>

using namespace std;
using namespace boost::lambda;

int main() {
	string w("galgje");
	string geraden(w.length(), '.');
	do {
		cout<<geraden<<endl<<"Raad een letter: ";
		char c;
		cin>>c;
		transform(w.begin(), w.end(), geraden.begin(), geraden.begin(), if_then_else_return(_1==c, _1, _2));
	}
	while (geraden!=w);
	cout<<"Je hebt het woord "<<w<<" geraden."<<endl;
	cin.get(); cin.get();
	return 0;
}
