-
Notifications
You must be signed in to change notification settings - Fork 607
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
consider renaming groupBy
to chunkBy
#901
Comments
WDYT @tscholak? |
I guess there are several issues here worth discussing:
First, when I was implementing Second, I am open to suggestions regarding a new name for the existing The third option is to make no changes at all. The current example for |
What about the name |
This suggestion comes from the fact that the signature of
groupBy
in other libraries is typically something along the lines ofFurthermore, the semantics of
groupBy
are to typically return each key only a single time, whereas this method returns the same key multiple times, potentially.I'm thinking of stdlib collections and also RX.
I think the function is still useful, but would suggest changing the name to
chunkBy
(and possibly the return type fromVector
toChunk
?), to make it clear the semantics are inherently different from thegroupBy
found in other libraries.Although the behaviour of
groupBy
is not ubiquitous in the same way asmap
,filter
, andflatMap
are, this will probably cause confusion to fs2 converts, like me!Also comment on gitter from original implementor :
The text was updated successfully, but these errors were encountered: