<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 usually 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></span></font></span><br></div></div></div></div></div>