[erlang-questions] lists:flatmap tail recursive?

Yogish Baliga yogishb@REDACTED
Fri Apr 3 04:12:17 CEST 2009

Here is a code snippet from lists module.

flatmap(F, [Hd|Tail]) ->
    F(Hd) ++ flatmap(F, Tail);
flatmap(F, []) when is_function(F, 1) -> [].

I was wondering if it is tail recursive? 

-- baliga

 "The quality of programmers is a decreasing function of the density of GOTO statements in the programs they produce." - Edsger W. Dijkstra

-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://erlang.org/pipermail/erlang-questions/attachments/20090402/8b55ee48/attachment.htm>

More information about the erlang-questions mailing list