Change type of function param to \Closure