Tail/Non tail recursion

Jilani Khaldi <>
Thu Aug 28 14:11:00 CEST 2003


Hi All,
Is there a better way to write this code when there is a lot of elements in 
the list?

square([H|T]) -> [(H*H|square(T)];
square([]) -> [].

Thanks.

jilani



More information about the erlang-questions mailing list