Defines a custom function.