Quirky question - should a sort algorithm be defined as a Function returning an array as the result or a procedure altering the array passed by reference?