[Haskell-cafe] optimization of recursive functions
Andrew Polonsky
andrew.polonsky at gmail.com
Wed Feb 13 09:55:16 CET 2013
Hello,
Is there any difference in efficiency between these two functions, when
compiled with all optimizations?
map f [] = []
map f (a:as) = f a : map f as
and
map f x = map' x where
map' [] = []
map' (a:as) = f a : map' as
Thanks,
Andrew
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://www.haskell.org/pipermail/haskell-cafe/attachments/20130213/9c2522de/attachment.htm>
More information about the Haskell-Cafe
mailing list