Say I have a pointer to a function _stack_push(stack* stk, void* el)
. I want to be able to call curry(_stack_push, my_stack)
and get back a function that just takes void* el
. I couldn't think of a way to do it, since C doesn't allow runtime function definition, but I know there are far cleverer people than me here :). Any ideas?