It's accessible to anybody with any experience programming and who is willing to pay attention. You are just taking a formula out of context, omitting the plain English explanation that comes before it, and pretending it's some kind of alien math. It's not scary at all, in fact it's very simple.
Let's do this in Python. First, write a function that curries:
def curry(f):
def g(x):
def h(y):
return f(x, y)
return h
return g
my_func = lambda x, y: 10 * x + y
curried = curry(my_func)
print(curried(5)(3))
# output: 53
Now, let's type it in such a way that mypy --strict won't complain:
from typing import TypeVar, Callable
A = TypeVar('A')
B = TypeVar('B')
C = TypeVar('C')
def curry(f: Callable[[A, B], C]) -> Callable[[A], Callable[[B], C]]:
def g(x: A) -> Callable[[B], C]:
def h(y: B) -> C:
return f(x, y)
return h
return g
What's the type of curry? Let's hover our cursor over the function name, and lo and behold:
Callable[[Callable[[A, B], C]], Callable[[A], Callable[[B], C]]]
That's it. That's
all it's saying.
Let's do this in Python. First, write a function that curries:
Now, let's type it in such a way that mypy --strict won't complain: What's the type of curry? Let's hover our cursor over the function name, and lo and behold: That's it. That's all it's saying.