mpc
Haskell-like feature supports in C++
mpc::functors Namespace Reference

Methods deducible from other methods of functor . More...

Variables

constexpr auto replace2nd = compose(mpc::fmap, constant)
 replace2nd :: a -> f b -> f a More...
 

Detailed Description

Methods deducible from other methods of functor .

Variable Documentation

◆ replace2nd

constexpr auto mpc::functors::replace2nd = compose(mpc::fmap, constant)
inlineconstexpr

replace2nd :: a -> f b -> f a

(<$) in Haskell

constexpr partial< detail::fmap_op > fmap
fmap :: (a -> b) -> f a -> f b
Definition: applicative.hpp:161
constexpr partial< detail::constant_op > constant
Returns a unary function always returning the first input.
Definition: constant.hpp:21
constexpr auto replace2nd
replace2nd :: a -> f b -> f a
Definition: functor.hpp:65