[erlang-questions] Is this code tail recursive?

Max Lapshin <>
Mon Sep 6 12:31:18 CEST 2010


On Mon, Sep 6, 2010 at 2:23 PM, Zvi <> wrote:
> Is this code tail recursive?
>
> f() ->
>   receive
>        Pattern ->  f()
>   after 1000
>        timeout
>   end.

Yes, of course.
Do not forget about difference between f() and ?MODULE:f()


More information about the erlang-questions mailing list