Replacing fold(_ + _) with sum as suggested by srowen