
11 Sep
2010
11 Sep
'10
3:13 a.m.
Which of these would be more costly for a long list? f :: [Int] -> [Int] f [x] = [x] f (x:xs) = x + (head xs) : f xs f :: [Int] -> [Int] f [x] = [x] f (x:y:xs) = x + y : f (y:xs) Michael