Currying with Mathematica
I don’t think there is any way to have attributes apply to the later parts of such an “upvalue” pattern definition. One alternative is to use pure functions with attributes. Not as convenient as pattern matching, but when you evaluate f[2+2][8/4], it actually gives a result Curry would have liked. (“Function” is Mathematica’s “lambda”, if … Read more