Currying/binding with ISO C99
问题 Say I want to implement a numerical integration routine with plain C. That will look something like this: double integrate(double (*f)(double), double lower, double upper, double step)); I often find functions that actually depend on multiple variables, and I want to integrate over the first one. Say I want to integrate this: double func(double x, double z); with respect to x . I cannot pass func to integrate since it has the wrong signature. Now I know the following workarounds, which were