/* * Minimal C++ implementation of Functor, Monad and Maybe. * * Requires c++0x variadic templates and lambda expressions: * * g++ -std=c++0x main.cpp -o main * * fmap, monadic bind and return implementations for std::vector * and Maybe. * * Copyright 2012 James Brotchie * https://github.com/brotchie/ * @brotchie * */ #include #include #include #include using namespace std; /* Functor */ template