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

should isMoreListLikeThanMapLike return true for things implementing .iterator? #25

Open
justinbmeyer opened this issue Jun 27, 2017 · 0 comments
Labels

Comments

@justinbmeyer
Copy link
Contributor

The following is both map-like and list-like:

var list = {};

	getSetReflections.setKeyValue(list,canSymbol.iterator,function(){
		return {
			i: 0,
			next: function(){
				if(this.i === 3) {
					return { value: undefined, done: true };
				}
				this.i++;

				return { value: (this.i-1)*2, done: false };
			}
		};
	});

I think anything that implements .iterator should be more list-like. Thoughts?

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

No branches or pull requests

1 participant