2008-12-10から1日間の記事一覧

C++でMaybeモナドを返すlookup関数を作ってみた

C++

ネタ元:C++でMaybeモナド shand/maybe.hpp #ifndef SHAND_MAYBE_INCLUDE #define SHAND_MAYBE_INCLUDE #include <boost/variant.hpp> #include <boost/utility/result_of.hpp> #include <boost/bind.hpp> #include <algorithm> #include <utility> #include <vector> #include <ostream> namespace shand { class nothing {}; temp…</ostream></vector></utility></algorithm></boost/bind.hpp></boost/utility/result_of.hpp></boost/variant.hpp>