<html>
<head>
<meta content="text/html; charset=utf-8" http-equiv="Content-Type">
</head>
<body bgcolor="#FFFFFF" text="#000000">
Tail call != tail recursive call. The former is more general and
includes the latter as a particular case.<br>
I'd change the wording as follows:<br>
<b>6.3 Tail function call</b><br>
If the last expression of a function body is a function call, a
<strong>tail call optimization</strong> is done.<br>
IMO, it would eliminate any ambiguity here.<br>
Anyway, thank you for clarification.<br>
<br>
Salikhov Dinislam<br>
<br>
<div class="moz-cite-prefix">On 10/17/2016 04:57 PM, Pierpaolo
Bernardi wrote:<br>
</div>
<blockquote
cite="mid:CANY8u7EB=hf57fbU9m1q2Z1uGdDSEBzcbDWBr1UQxxEub=Zf9w@mail.gmail.com"
type="cite">
<pre wrap="">On Mon, Oct 17, 2016 at 2:47 PM, Salikhov Dinislam
<a class="moz-txt-link-rfc2396E" href="mailto:Dinislam.Salikhov@kaspersky.com"><Dinislam.Salikhov@kaspersky.com></a> wrote:
</pre>
<blockquote type="cite">
<blockquote type="cite">
<pre wrap="">There is nothing about recursion in documentation.
</pre>
</blockquote>
<pre wrap="">The only doc that I've managed to find about the subject is the link from my
initial post
(<a class="moz-txt-link-freetext" href="http://erlang.org/doc/reference_manual/functions.html#id78464">http://erlang.org/doc/reference_manual/functions.html#id78464</a>).
And it says about recursion: in sub-chapter's header, in sub-chapter itself
and in the example (all in all, everywhere). Is there another documentation
that you mean?
</pre>
</blockquote>
<pre wrap="">
Yes, the chapter sub-header has 'recursion' in the name.
But the text says: "If the last expression of a function body is a
function call, a tail recursive call is done."
This in no way can be read as meaning that when the last expression of
a function body is a function call then a tail call is not mandated.
Maybe changing "tail recursive call" to "tail call" would remove an
element of distraction and be more to the point though.
</pre>
</blockquote>
<br>
</body>
</html>