Add some methods for Function.