Bank of America interview question

Explain why you would use a function instead of a procedure