I need your help to calculate average of numbers in text file using high-order functions

Hello everyone. Will you please tell me how to calculate the average of numbers in a text file by using mapreduce function? I really need your help. Thank you.