optimization of list comprehensions

Mats Cronqvist mats.cronqvist@REDACTED
Fri Mar 10 14:41:55 CET 2006

Bengt Kleberg wrote:
> On 2006-03-10 13:34, Mats Cronqvist wrote:
> ...deleted
>>   but that depends entirely of what you mean by "perfectly fine". it's 
>> not like recursive functions are being obsoleted. it might even be 
>> faster to execute.
>>   in this particular case, your opinion and my opinion are the same. 
>> but they are just opinions, not laws of nature.
> it is possible to introduce sufficient amounts of relativism into 
> (every?) discusion as to render it meaningless.

   yes, that didn't come out very well did it :>
   alas, a certain amount of relativism is perhaps unavoidable?
   consider the code below. i think foo/0 is a completely unacceptable eyesore, 
whilst bla/1 is merely annoying.
   i know for a fact that some people think foo/0 is perfectly fine erlang. so 
how would you propose i argue they're wrong?



foo()-> FOO = ?FOO "FOO".

bla(X) -> bla(tl(X),{hd(X)}).
bla([H|T],A) -> bla(T,{H,A});
bla([],A) -> A.

More information about the erlang-questions mailing list