-
Notifications
You must be signed in to change notification settings - Fork 0
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
Enhance functionalities #7
Conversation
Codecov ReportAttention: Patch coverage is
❗ Your organization needs to install the Codecov GitHub app to enable full functionality.
Flags with carried forward coverage won't be shown. Click here to find out more.
|
🧙 Sourcery is reviewing your pull request! Tips and commandsInteracting with Sourcery
Customizing Your ExperienceAccess your dashboard to:
Getting Help
|
@sourcery-ai review
Summary by Sourcery
Add support for creating finite ordered streams using a condition predicate, creating streams from ranges and range objects, reading and writing plain text files, handling None values when creating streams, discarding falsy values during filter mapping, adding close handlers to streams, enumerating stream elements, calculating averages, retrieving the first or last element of a stream, and appending to plain text files. Improve documentation and add leetcode examples.
New Features:
from_range()
to create streams from ranges and range objects.FileStream
.of_nullable()
to handle None values when creating streams.discard_falsy
parameter tofilter_map()
to discard falsy values.on_close()
to add close handlers to streams.enumerate()
to get stream elements with their indices.average()
to calculate the average of stream elements.take_first()
andtake_last()
to retrieve the first or last element of a stream.FileStream
.Tests: