<html><body style="word-wrap: break-word; -webkit-nbsp-mode: space; -webkit-line-break: after-white-space; ">
<div><br></div><div>It is indeed a well-known fact that streams and coroutines are two sides of the same coin. Talcott's 1986 dissertation is the earliest theoretical treatment that I know. -- Matthias</div><div><br></div><div><br></div><br><div><div>On Apr 18, 2009, at 5:38 PM, Jos Koot wrote:</div><br class="Apple-interchange-newline"><blockquote type="cite"> <div><font face="Courier New" size="2"> <div><font face="Courier New" size="2">It seems to me that in many cases the same problem can be solved (for an eager evaluater) both by coroutines and by streams. Both solutions very well show the structure of the principal algorithm as might have been written with a lazy evaluator in mind. Which approach would be preferred in terms of efficiency (time and memory). May be you would like to address other aspects as well. One reason that makes me tend to choose streams, is that the latter seem better suited to automatic code generation from purely lazy code.</font></div> <div><font face="Courier New" size="2">Thanks, Jos</font></div></font></div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; ">_________________________________________________</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-converted-space"> </span>For list-related administrative tasks:</div><div style="margin-top: 0px; margin-right: 0px; margin-bottom: 0px; margin-left: 0px; "><span class="Apple-converted-space"> </span><a href="http://list.cs.brown.edu/mailman/listinfo/plt-scheme">http://list.cs.brown.edu/mailman/listinfo/plt-scheme</a></div> </blockquote></div><br></body></html>