26 #ifndef MLN_FUN_COMPOSE_HH
27 # define MLN_FUN_COMPOSE_HH
29 # include <mln/fun/binary.hh>
30 # include <mln/fun/composition.hh>
31 # include <mln/fun/param.hh>
38 struct compose : binary<compose> {};
43 template <
template <
class>
class CatF,
typename F,
template <
class>
class CatG,
typename G>
44 struct compose_helper;
48 template <
template <
class>
class CatF,
typename F,
49 template <
class>
class CatG,
typename G>
50 struct parameter< internal::compose_helper<CatF, F, CatG, G> >
52 typedef typename internal::composition<CatF, F, CatG, G>::exact_type result;
53 typedef typename result::param param;
59 template <
template <
class>
class CatF,
typename F,
template <
class>
class CatG,
typename G>
65 typedef typename composition<CatF, F, CatG, G>::exact_type result;
66 typedef mln_trait_fun_param(result) param;
68 static result read(const F& f, const G& g)
70 return result(param(f, g));
85 template <
typename F,
typename G>
88 typedef mln::fun::internal::compose_helper<mln::Meta_Function_v2v, F, mln::Meta_Function_v2v, G> ret;
91 template <
typename F,
typename G>
94 typedef mln::fun::internal::compose_helper<mln::Meta_Function_v2v, F, mln::Meta_Function_vv2v, G> ret;
97 template <
typename F,
typename G>
100 typedef mln::fun::internal::compose_helper<mln::Meta_Function_v2v, F, mln::Function_v2v, G> ret;
103 template <
typename F,
typename G>
106 typedef mln::fun::internal::compose_helper<mln::Meta_Function_v2v, F, mln::Function_vv2v, G> ret;
115 #endif // ! MLN_FUN_COMPOSE_HH