
1 Oct
2008
1 Oct
'08
4:32 p.m.
Joel de Guzman:
Maybe you want:
let(_a = 0)[ ++_a ]
Maybe I do. :-)
phx::for_each(_1, lambda[std::cout << _1 << std::endl])
Notice that like protect, there are two function invocations happening here.
The confusion here comes from the fact that the above would work if lambda[] had "unlambda" semantics, that is, if it returned a function object that was not a phoenix expression.
- \ \ double - /\ f . /\ x. f(f x) - / \ / \
lambda( _f = _1 )[ bind( _f, bind( _f, _1 ) ) ] ?