Calling task inside function

In reply to dave_59:

Hi Dave,

could you give some use-cases for calling tasks within functions?

Thanks