mpc
Haskell-like feature supports in C++
mpc::applicatives::detail::discard1st_opt_op Struct Reference

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

#include <applicative.hpp>

Public Member Functions

template<class Fa , class Fb >
constexpr auto operator() (Fa &&fa, Fb &&fb) const noexcept(noexcept(mpc::seq_apply(mpc::replace2nd(identity, std::forward< Fa >(fa)), std::forward< Fb >(fb)))) -> decltype(mpc::seq_apply(mpc::replace2nd(identity, std::forward< Fa >(fa)), std::forward< Fb >(fb)))
 

Detailed Description

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

(*>) in Haskell

Use this method if you have an optimized replace2nd.

constexpr auto discard1st
discard1st :: f a -> f b -> f b
Definition: applicative.hpp:191
constexpr auto seq_apply
seq_apply :: f (a -> b) -> f a -> f b
Definition: applicative.hpp:170
constexpr partial< detail::replace2nd_op > replace2nd
replace2nd :: a -> f b -> f a
Definition: functor.hpp:53
constexpr partial< std::identity > identity
Identity mapping.
Definition: identity.hpp:11

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