[swift-evolution] About the PermutationGenerator

Dmitri Gribenko gribozavr at gmail.com
Thu Dec 31 07:08:40 CST 2015


On Thu, Dec 31, 2015 at 3:04 PM, Susan Cheng <susan.doggie at gmail.com> wrote:
> yes for sequences are not immutable. I get confused.
>
> no for sequences should be definition of lists of values. Just like
> Fibonacci sequence, we can calculate the values form the start of the
> Fibonacci sequence one by one. But we are not accessing the values of
> Fibonacci sequence.

Those are collections.  Collections can be iterated over multiple times.

Dmitri

-- 
main(i,j){for(i=2;;i++){for(j=2;j<i;j++){if(!(i%j)){j=0;break;}}if
(j){printf("%d\n",i);}}} /*Dmitri Gribenko <gribozavr at gmail.com>*/


More information about the swift-evolution mailing list