in reply to calculating array average in HoA
Brilliant solution, JavaFan! A sort before keys would 'prettify' the output.