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

Skip to content

Conversation

@adamgfraser
Copy link
Contributor

The current signature of checkSome is a bit irregular because it takes a generator, then a size, then the test. Normally in ZIO combinators like foreachParN would take the n parameter first. We originally had it this way but had to change it when we added the overloaded variants for multiple generators because it created ambiguity since the first parameter list was the same.

This PR uses the partial application to restore the order so the size parameter is first. I think this is a little nicer and more regular with the rest of ZIO though it does add a little complexity and make the methods a bit less discoverable.

Copy link
Member

@jdegoes jdegoes left a comment

Choose a reason for hiding this comment

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

Appreciate the consistency! We're teaching users and reinforcing them about how to use the whole ZIO ecosystem. ❤️

@adamgfraser adamgfraser changed the title ZIO Test: Improve Order of Type Parameters in CheckSome ZIO Test: Improve Order of Parameters in CheckSome Nov 15, 2019
@adamgfraser adamgfraser merged commit 9a4fc18 into zio:master Nov 15, 2019
@adamgfraser adamgfraser deleted the checkSome branch November 15, 2019 03:26
Twizty pushed a commit to Twizty/zio that referenced this pull request Nov 18, 2019
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