We often need to either create a new function type or use an existing one. It would be good to encapsulate this behaviour in a separate function.