Question: passing function and applying argument

F := proc(f,x)

    f(x); # invalid.

end proc;

 

f := (a,b,c)->a*b*c;

 

F(f,3);

    = 3*b*c;

 

How can I just apply 3 to one of the parameters in F without knowing how man(I really want to apply it to the first parameter but it doesn't matter all that much).

 

I really need to sorty of curry and uncurry a function. I might want to pass an function of arbitrary dimension but only apply a value to one parameter(usually the first).

 

while I could do somethign like

 

F(x->f(x,b,c))

 

this is kinda verbose and requires me to know the parameters of f at the call site, I don't think that is necessary.

Please Wait...