bind

Synopsis

template <class MonadTag, class A, class F>
struct bind
{
  // unspecified
};

Description

bind is a metafunction for the bind operation of the monad typeclass.

#include <mpllibs/metamonad/bind.hpp>

Expression semantics

For any monad_tag tag, a class and f metafunction taking one argument:

bind<monad_tag, a, f>

is equivalent to

apply<monad<monad_tag>::bind, a, f>

Example

using boost::mpl::always;

struct one_error;
struct other_error;

typedef
  bind<
    exception_tag,
    exception<one_error>,
    always<exception<other_error>>
  >::type
  exception_one_error;

[up]