I'm passing a function, f, to another function, SInf, but the 20+ times I call f in SInf, I call `f(1./x)/(x*x)`. 

Is there a way to have another function, say `g(x)=f(1./x)/(x*x)`? Though I guess not necessary to complete what I need to do, it would dramatically improve readability of the code. 

I would rather not have a class or struct external to SInf, since I want it to be able to replace similar functions.

```
double SInf(double (*f)(double), int N, double aa, double bb, bool closed=true)
{

            struct functions{
             double fi(double x){return f(1./x)/(x*x);}
     };
     //bla bla lots of code
}

```

gives me 

```
error: use of parameter from containing function

```