<div dir="ltr"><br><div class="gmail_quote"><div dir="ltr"><div class="gmail_quote"><div dir="ltr"><div><div><div><div><div><div><div>Hi guys,<br></div>I'm playing with the mysterious "some" and "many" from Control.Applicative.<br></div>If I try: <br><br><span style="font-family:monospace,monospace">many $ Just 1<br><br></span></div><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif">It just loops, I understand why:<br><a href="http://stackoverflow.com/questions/18108608/what-are-alternatives-some-and-many-useful-for" target="_blank">http://stackoverflow.com/quest<wbr>ions/18108608/what-are-alterna<wbr>tives-some-and-many-useful-for</a><br></font></span></div><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif">It seems that some and many are normally used in a context where something is consumed, and can be depleted, so the loop ends.<br><br></font></span></div><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif">But why doesn't this terminates?<br><br></font></span></div><span style="font-family:monospace,monospace">take 3 $ many $ Just 1<br></span><span style="font-family:arial,helvetica,sans-serif"><br></span></div><span style="font-family:arial,helvetica,sans-serif">It's a recursive call, but the construction of the result should be lazy...<span class="HOEnZb"><font color="#888888"><span><font color="#888888"><br></font></span></font></span></span><span class="HOEnZb"><font color="#888888"><span><font color="#888888"><div><div><div><div><div><span style="font-family:monospace,monospace"><font face="arial,helvetica,sans-serif"><br></font></span></div><br><div><div><div><div><br><br clear="all"><div><div><br>-- <br><div><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">==============================<wbr>=======<br>Corentin Dupont<br>CREATE-NET<br>OpenIoT Research Area - Senior Researcher<br>Via alla Cascata 56/D - 38123 Povo, Trento - Italy<br>e-mail: <a href="mailto:corentin.dupont@create-net.org" target="_blank">corentin.dupont@create-net.org</a><br>Skype: corentin.dupont1<br><a href="http://www.create-net.org" target="_blank">www.create-net.org</a><br>==============================<wbr>========</div></div></div></div></div></div>
</div></div></div></div></div></div></div></div></div></div></font></span></font></span></div><span class="HOEnZb"><font color="#888888">
</font></span></div><span class="HOEnZb"><font color="#888888"><br><br clear="all"><br>-- <br><div data-smartmail="gmail_signature"><div dir="ltr"><div><div dir="ltr"><div><div dir="ltr">==============================<wbr>=======<br>Corentin Dupont<br>CREATE-NET<br>OpenIoT Research Area - Senior Researcher<br>Via alla Cascata 56/D - 38123 Povo, Trento - Italy<br>e-mail: <a href="mailto:corentin.dupont@create-net.org" target="_blank">corentin.dupont@create-net.org</a><br>Skype: corentin.dupont1<br><a href="http://www.create-net.org" target="_blank">www.create-net.org</a><br>==============================<wbr>========</div></div></div></div></div></div>
</font></span></div>
</div><br></div>