template <class Name, class Exp, class Body>
struct eval_letrec_c
{
// unspecified
};
The same as eval_letrec
, but Exp
and Body
are angle-bracket expressions and not syntaxes.
#include <mpllibs/metamonad/eval_letrec_c.hpp>
For any n
, e
and b
classes
eval_letrec_c<n, e, b>::type
is equivalent to
eval_letrec<n, syntax<e>, syntax<b>>::type
using boost::mpl::times;
using boost::mpl::plus;
using boost::mpl::minus;
using boost::mpl::int_;
using boost::mpl::equal_to;
struct fact;
typedef
eval_letrec_c<
fact,
lambda_c<
n,
if_<
equal_to<n, int_<0>>,
int_<1>,
lazy<times<apply<fact, minus<n, int_<1>>>, n>>
>
>,
lazy<apply<fact, int_<3>>>
>::type
fact_3;
Copyright Abel Sinkovics (abel at elte dot hu) 2011. Distributed under the Boost Software License, Version 1.0. (See accompanying file LICENSE_1_0.txt or copy at http://www.boost.org/LICENSE_1_0.txt