Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ch04: Possible error in output example of "Building Versatility Into Iterating a Playlist" #65

Closed
vsemozhetbyt opened this issue Jul 25, 2018 · 1 comment

Comments

@vsemozhetbyt
Copy link
Contributor

See last code examples in this section.

If I get this right, we get a sequence from the shuffleSongs() just once and iterate this sequence every time in the same order. So we cannot have different order inside each loop like:

// <- ['a', 'b', 'b', 'a', 'a', 'b']

Only these varians are possible:

// <- ['a', 'b', 'a', 'b', 'a', 'b']
// <- ['b', 'a', 'b', 'a', 'b', 'a']
@bevacqua
Copy link
Member

This is correct to maintain consistency across runs. If you wanted different orders every time, you can keep calling playlist()

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants