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

update: updating sequence diagrams #4646

Merged
merged 2 commits into from
Jan 17, 2025
Merged

Conversation

daniCsorbaJB
Copy link
Contributor

Creating new diagrams to demonstrate how using sequences differ from using a list approach.
Related issue: KT-72898

@AlejandraPedroza AlejandraPedroza self-requested a review January 14, 2025 16:52
@AlejandraPedroza AlejandraPedroza self-assigned this Jan 14, 2025
Copy link
Contributor

@AlejandraPedroza AlejandraPedroza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice diagrams ⭐ I left some comments and will discuss a couple of points more on Slack.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Should it be .filter, .map, and .take (with a period .) when mentioning these functions in this and the rest of the images?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as discussed - let's keep it without . as these are not extension functions

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Maybe a small detail, but I think the vertical line separating the not-processed words is a bit crooked. You can see the distance between the line and the left-hand rectangles is different.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

excellent idea - updated it


In this example, the sequence processing takes 18 steps instead of 23 steps for doing the same with lists.
In this example, by processing elements lazily and stopping once four items are found, sequences reduce the total number
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Would something simpler work? Like:
In this example, lazy processing of elements and stopping after finding four items minimizes the number of operations compared to a list approach.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Hmm - I like this approach but I prefer reduce over minimize - it's not necessarily minimized just reduced - but could probably be further reduced with some other optimization step 🤔

Copy link
Contributor

@AlejandraPedroza AlejandraPedroza left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice improvements! LGTM 🚀

@daniCsorbaJB daniCsorbaJB marked this pull request as ready for review January 17, 2025 10:24
@daniCsorbaJB daniCsorbaJB requested a review from a team as a code owner January 17, 2025 10:24
@daniCsorbaJB daniCsorbaJB merged commit e8ff91d into master Jan 17, 2025
4 checks passed
@daniCsorbaJB daniCsorbaJB deleted the updating-sequences-diagrams branch January 17, 2025 10:30
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

Successfully merging this pull request may close these issues.

2 participants