In functional programming, loops are implemented using recursion and tail<span></span>calls. You have the power of loops beyond what "for" and "while" can express.<br><br>On Tuesday, November 26, 2013, Alexandr M  wrote:<br>
<blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex"><div dir="ltr">Hello !<div><br></div><div>Could anybody explain me how to calculate simple moving average of a list ?</div>
<div><br></div><div>I have found several examples in internet but I completely don't understand how it works.</div>
<div><br></div><div>Basically it's necessary to iterate over the list of real numbers and calculate average values over last n items in the list.</div><div><br></div><div>I just can't imagine how to do it without loops.</div>

<div><br></div><div><div>-- <br></div>Best regards,<br>Alex<br>
</div></div>
</blockquote>