Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@adamgfraser
Copy link
Contributor

No description provided.

@adamgfraser adamgfraser requested a review from iravid as a code owner February 15, 2021 18:58
* previous element emitted, using natural equality to determine whether two
* elements are equal.
*/
def changes: ZStream[R, E, O] =
Copy link
Member

Choose a reason for hiding this comment

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

Would dedup be a better name? (Not sure about that.)

Copy link
Contributor Author

@adamgfraser adamgfraser Mar 16, 2021

Choose a reason for hiding this comment

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

Yes I wondered about that too. This is distinctUntilChanged in reactive streams and removeDuplicates in some other frameworks so deduplicate is definitely reasonable. The slightly tricky thing is it doesn't necessary remove all duplicates in the sense that if the stream emits A, A, B, A the resulting stream will be A, B, A so you will still have two A values just not two consecutive ones.

Copy link
Member

Choose a reason for hiding this comment

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

I'm ok with changes especially if there is no clear pattern.

@jdegoes jdegoes merged commit 1fbf3ec into zio:master Mar 17, 2021
@adamgfraser adamgfraser deleted the changes branch March 17, 2021 20:13
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