Freundlich's C++ toolkit
No Matches
fcppt::monad::instance< Type > Struct Template Reference

Detailed Description

template<typename Type>
struct fcppt::monad::instance< Type >

Used to implement a monad instance.

This class needs the following:

  • template<typename Type> struct constructor with an inner typedef called type. This applies the monad constructor to Type.
  • template<typenameType> struct inner_type with an inner typedef called type. This extracts the type passed to a monad constructor.
  • A static function template<typename T> constructor<T> return_(T).
  • A static function template<typename T,typename U> constructor<U> bind(constructor<T>,constructor<U>(T)).