how to pass a function as a parameter code example
Example 1: python function that takes a function
def myfunc(anotherfunc, extraArgs):
anotherfunc(*extraArgs)
Example 2: passing a function as an argument in c
void func ( void (*f)(int) ) {
for ( int ctr = 0 ; ctr < 5 ; ctr++ ) {
(*f)(ctr);
}
}