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

take(0) returns 1 #107

Closed
svachalek opened this issue Aug 16, 2016 · 2 comments
Closed

take(0) returns 1 #107

svachalek opened this issue Aug 16, 2016 · 2 comments

Comments

@svachalek
Copy link

This can be trivially verified by altering the first unit test:

    const stream = xs.periodic(50).take(0);
    const expected = [];

Obviously you would never literally take(0) but in a case of take(n), this requires a special case for n === 0.

@staltz
Copy link
Owner

staltz commented Aug 16, 2016

Thanks. Seems obvious to fix.

staltz added a commit that referenced this issue Aug 17, 2016
take(0) should just immediately complete, like xs.empty()

Closes issue #107.
@staltz
Copy link
Owner

staltz commented Aug 17, 2016

Fixed in v5.3.5

@staltz staltz closed this as completed Aug 17, 2016
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Projects
None yet
Development

No branches or pull requests

2 participants