Monday, May 30, 2011

Average of a List

avg2::[Int]->Int
avg2 (x:xs) = (sum xs )`div` length xs

No comments:

Post a Comment