In programming languages with

partial application (or currying or whatever you call it) all functions only take one argument. Except they don't always return a value, but sometimes they return a new function of one argument. (Most notably, the syntax of these languages doesn't use parentheses for evaluating functions: adding 1 and 1 is

add 1 1. Unless you have another function inside of course:

10 + add (negate 1) (2+3).)

For example,

negate is a function that takes a number and returns a number, so

42 negate (I'm writing it in RPN here) is simply the number

-42. Meanwhile,

add is a function that naturally takes 2 numbers and returns a number, but with currying it's a function that takes one number and returns a {function that takes one number and returns a number}, so

2 add is a function that takes a number and returns a number, and

40 2 add is

40 (2 add) is again the number

42.

And you can apply this to functions with more arguments too:

solveQuadratic (giving some solution of x for ax^2+bx+c=d) is a function that takes a number and returns a {function that takes a number and returns a {function that takes a number and returns a {function that takes a number and returns a number}}}.

What you need for this approach is a way to store partially applied functions on the stack, either by storing a tuple of

(function,[argument]) or by actually defining the functions as functions of a function of a function of one argument.

You can generalize your operators to this form, too. Instead of the stack seeing

(+) at the top and taking 2 values to calculate the result and pushing a number to the stack, you can also take 1 value from the stack and push

partial(+,[value]) to the stack. And then it sees

partial(+,[value]) at the top and takes another value from the stack to arrive at

partial(+,[value,value]) and since

(+) takes 2 arguments, the partial can now be evaluated and return a number.

Or all the curry blabbering aside: what you need for each non-operator function is the knowledge of how many arguments they take. If you see

solveQuadratic and it is defined as taking 4 arguments, you pop 4 values from the stack and feed them to the function.

If you don't know how many arguments a function takes, or it's a variadic function, you get into trouble. (In that case, you need some syntax to denote function arguments/n-tuples/lists and be able to put those on the stack as single elements)

Also what phlip says.