<div dir="ltr"><div class="gmail_extra"><div class="gmail_quote">On Thu, Dec 31, 2015 at 2:01 PM, Susan Cheng via swift-evolution <span dir="ltr"><<a href="mailto:swift-evolution@swift.org" target="_blank">swift-evolution@swift.org</a>></span> wrote:<br><blockquote class="gmail_quote" style="margin:0 0 0 .8ex;border-left:1px #ccc solid;padding-left:1ex">As I know SequenceType should have behaved as immutable structure and it provides method to get a mutable GeneratorType which generates value from start of sequence.</blockquote><div><br></div><div>Sequences are not immutable. A sequence is allowed to be consumed by iterating over its generator. If the type you have is a sequence, you can only assume that you can access the elements only once. For example, a socket can be modeled as a sequence of bytes. Once the bytes are consumed from the corresponding generator, they are gone from the sequence.</div><div><br></div><div>Dmitri</div><div><br></div></div>-- <br><div class="gmail_signature">main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if<br>(j){printf("%d\n",i);}}} /*Dmitri Gribenko <<a href="mailto:gribozavr@gmail.com" target="_blank">gribozavr@gmail.com</a>>*/</div>
</div></div>