Returns the composition of several metafunction classes. More...
#include <boost/mpl11/fwd/functional.hpp>
Returns the composition of several metafunction classes.
Specifically, apply<compose<f, g>, x, xs...>
is equivalent to apply<f, apply<g, x>, xs...>
, and compose<f>
is equivalent to f
. Note that only the first argument is passed to g
; use bind<f, g>
instead if all the arguments must be passed to g
.
More than two metafunction classes can also be composed at once; compose<f1, f2, fs...>
is equivalent to compose<f1, compose<f2, fs...>>
. Also note that compose
is associative, i.e. compose<f, compose<g, h>>
is equivalent to compose<compose<f, g>, h>
.
Haskell pseudo-code: