-
Notifications
You must be signed in to change notification settings - Fork 4k
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
Conversation
There was a problem hiding this 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.
There was a problem hiding this comment.
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?
There was a problem hiding this comment.
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
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
excellent idea - updated it
docs/topics/sequences.md
Outdated
|
||
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 |
There was a problem hiding this comment.
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.
There was a problem hiding this comment.
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 🤔
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Nice improvements! LGTM 🚀
Creating new diagrams to demonstrate how using sequences differ from using a list approach.
Related issue: KT-72898