Pass function directly without anonymous function