MPL11
 All Classes Namespaces Files Typedefs Macros Groups Pages
List of all members
boost::mpl11::argmap< f, g > Struct Template Reference

Invokes f with the result of mapping g on each argument. More...

#include <boost/mpl11/fwd/functional.hpp>

Detailed Description

template<typename f, typename g>
struct boost::mpl11::argmap< f, g >

Invokes f with the result of mapping g on each argument.

Specifically, apply<argmap<f, g>, x...> is equivalent to apply<f, apply<g, x>...>.

Note
argmap is associative, i.e. argmap<f, argmap<g, h>> is equivalent to argmap<argmap<f, g>, h>.

Haskell pseudo-code:

-- definition
argmap f g $ xs... = f (g xs)...
-- proof of associativity
argmap f (argmap g h) $ xs... == f ((argmap g h) xs)...
== f (g (h xs))...
argmap (argmap f g) h $ xs... == (argmap f g) (h xs)...
== f (g (h xs))...