On May 31, 3:07 am, Joel de Guzman
What are the args to LambdaExp?
ok, I think I simplified the code as much as possible to its bare
bones, here it is a compilable example of what I need.
as you see first there is a lambda version which is concise and works,
then follows the phoenix attempt.
I have and expression template _1 + 1. or arg1 + 1. and I am trying to
compose it with two free functions (sq and div2).
Take _1 + 1. or arg1 + 1. as black box (this is an example of what the
subexpression that the pattern matching recognizes in the full
example).
The precise question is what is the phoenix translation of the lambda
"bind(&div2, (_1+1.)(bind(&sq, _1) ) )" ?
[ _1+1. is just an example, in the real code is some argument passed
and can be any expression, in other words "(_1+1.)" must remain there,
so (bind(&div2, (bind(&sq,arg1) ) + 1. ) is not the answer I am
looking for].
the full minimal example is below:
#include