
11 Jun
2008
11 Jun
'08
11:24 p.m.
page:
Definition of f: f = foldr (+) 0 Types: 0 :: (Num t) => t foldr (+) 0 :: Num a => [a] -> a f :: [Integer] -> Integer
Please remind me, again, of the advantages of f being something different from the formula defining it.
Overloaded 'constants' take a dictionary as an argument, so while you think the value might be computed only once, it make actually be recomputed each time. This can be a killer performance penalty for overloaded numeric constants. Of course, disabling this is pretty simple. -- Don