SImple function currying?

I would like my student to enter a function that may involve constants set by sliders in my graph.

Right now, it seems that those constants are not available because there is no context for them at the call to simpleFunction.

I can get the values I want to replace in the script, so if there was a way to replace a variable in a latex string I could do that.

I could also create a multiple parameter function, but the graph’s function sink only accepts those with a single parameter.

Am I out of luck?

(I’m trying to have students define a value b for a parabola based on the axis of symmetry and the other coefficients).

[The example I’m working with is slide 5 of Playing with parabolas • Activity Builder by Desmos and I want the answer to be b=-2ax)

I have a solution for this particular case:

Create a three parameter function, and rather than adding the function to the graph, evaluate it and store the result in a new variable instead.

I think I get what you did here, but do you happen to have an activity code that you can share?

You can click the link and copy and edit or just preview it as a student

The activity is here.. The problem in question is on page 5.

The heavy lifting is in the CL for the graph.