mpc
Haskell-like feature supports in C++
mpc::states::detail::gets_op< ST > Struct Template Reference

#include <class.hpp>

Classes

struct  closure
 

Public Member Functions

constexpr auto operator() () const noexcept(noexcept(mpc::state< ST >(closure{}))) -> decltype(mpc::state< ST >(closure{}))
 

Detailed Description

template<class ST>
struct mpc::states::detail::gets_op< ST >

state :: (s -> (a, s)) -> m a state f = do s <- get let ~(a, s') = f s put s' return a gets :: m s gets = state (s -> (s, s))


The documentation for this struct was generated from the following file: