mpc
Haskell-like feature supports in C++
mpc::monads::detail::discard1st_op Struct Reference

discard1st :: f a -> f b -> f b More...

#include <monad.hpp>

Public Member Functions

template<class Ma , class Mb >
constexpr auto operator() (Ma &&ma, Mb &&mb) const noexcept(noexcept(mpc::bind(std::forward< Ma >(ma), constant % std::forward< Mb >(mb)))) -> decltype(mpc::bind(std::forward< Ma >(ma), constant % std::forward< Mb >(mb)))
 

Detailed Description

discard1st :: f a -> f b -> f b

(*>) in Haskell

discard1st m1 m2 = m1 `bind` (constant m2)
constexpr partial< detail::bind_op > bind
bind :: forall a b. m a -> (a -> m b) -> m b
Definition: monad.hpp:45
constexpr partial< detail::constant_op > constant
Returns a unary function always returning the first input.
Definition: constant.hpp:21
constexpr partial< detail::discard1st_op > discard1st
discard1st :: f a -> f b -> f b
Definition: monad.hpp:109

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