Try

map(f -> (x, y) -> -f(x, y), foolist)

On 24 March 2015 at 09:35, Andrei Berceanu <[email protected]> wrote:

> Hi guys,
>
> Say I have a tuple of anonymous functions, such as:
>
> *foolist = ((x,y)-> exp(x*y), (x,y)-> sin(x+y))*
>
> and would like to (programatically) produce another tuple where every
> function has its overall sign changed. In my example this would be
>
>
>
> *newfoolist = ((x,y)-> -exp(x*y), (x,y)-> -sin(x+y))*Can this be done,
> i.e. metaprogramming or some other technique? How?
>
> Tnx!
>

Reply via email to