Function
differs from a Procedure
only that it necessarily returns a value and can be used in expressions.
Based on the above-mentioned, a function
which does not contain a return is itself erroneous. Corrections required:
- implement return if the implemented method is a function
- rewrite function to procedure if return is not needed