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

Stream not closing after terminal operation #41

Closed
garlontas opened this issue Jul 19, 2023 · 1 comment
Closed

Stream not closing after terminal operation #41

garlontas opened this issue Jul 19, 2023 · 1 comment
Labels
bug Something isn't working

Comments

@garlontas
Copy link
Member

Describe the bug
Streams are returning results, although they have been consumed.

To Reproduce

stream = Stream.of([1, 2, 3, 4, 5, 6])
print(stream.sum()) # 21
print(stream.filter(lambda x: x % 2 == 0).reduce(lambda x, y: x + y)) # Optional(12)

Expected behavior
Line 3 should fail with error: Stream has been closed

@garlontas garlontas added the bug Something isn't working label Jul 19, 2023
garlontas added a commit that referenced this issue Jul 20, 2023
…g-after-terminal-operation

Bugfix/#41/stream not closing after terminal operation
@garlontas
Copy link
Member Author

Closed by #42

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
bug Something isn't working
Projects
None yet
Development

No branches or pull requests

1 participant