Returns a function.