-
Notifications
You must be signed in to change notification settings - Fork 182
Consider adding Data.Sequence.{splitAtR, takeR, dropR} #159
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
Comments
In general, the way to get things added to |
Personally I am not sure whether these functions would benefit the API. Sure, I understand the consistency argument. On the other side, having a lot of functions can be a bit overwhelming and complicated for the users to find what they like. As the suggested functions just "reverse" the index given to them (to index from right instead of left), I would personally not include in the API (it is trivial to implement them by yourself, and I do not think they are used very frequently). Note that that is not the case with |
@treeowl: If I understand the process correctly, a proposal should start out with an issue on the tracker; this is that. @foxik: For what it's worth, I did not see the solution, though that may be indicative of my problem solving skills more than the API quality. ;) Seeing that If you don't consider these functions worth adding, would you accept a doc patch that points out how to implement them? |
@JLimperg It is my personal view that the functions you are suggesting are not worth adding -- but others may feel differently. Therefore do not hesitate to ask on libraries@haskell (or somewhere else) and if more people would like to have the functions in the API, I will gladly add them. As for the doc patch, that we can surely add. |
It's my personal view that these functions are worth adding, but I agree with @foxik that the matter should be raised on the libraries list. |
This was requested again in #884, and treeowl and I are both in favor of adding the variants. A PR would be welcome. |
I was recently surprised by the lack of
splitAtR
,takeR
anddropR
inData.Sequence
whentakeWhileR
anddropWhileR
are available. Taking this question to Stack Overflow, a simple implementation ofsplitAtR
in terms ofsplitAt
andlength
was suggested by SO userchi
. Would you consider adding these functions?The text was updated successfully, but these errors were encountered: