Iteration over lists

Mats Cronqvist mats.cronqvist@REDACTED
Mon Mar 20 16:13:46 CET 2006


Emil Öberg (LN/EAB) wrote:
>  [...]
> As it is now I will have to
> recommend  designers not to use map() and absolutely not list comprehension on large lists.

   i think you ought recommend them to *always* use list comprehensions (for 
map-like operations), lists:foreach/2 (for side-effects only) or lists:foldl/3 
(for folds). if the customers/testers complain about speed, profile and rewrite.
   in my experience, optimizing without profiling is typically sub-optimal.

   mats



More information about the erlang-questions mailing list