Conversation
Thus far, this proposal has gotten good reception on the libraries list.
|
Have you benchmarked and showed that it's faster than |
|
Oh, you mean |
|
The bigger question here is: should we add applicative versions of every function to the containers API? There's an argument to be made for it. You might want to perform some effect when doing e.g. an |
|
There's been a big trend to move away from lists as the only container type that gets a lot of good functions, and I personally think that's a good thing. Making people roll their own functions to use |
|
Appologies if this is too tangential: I haven't seen a proposal but is there any reason why Then not every data structure would have to provide its own implementation of these functions since it would just use the Foldable instance, which Sequence already has. This is obviously a much larger change, but was wondering if this has been considered. Edit: duh, this doesn't have the same type as the filterM in the PR. |
treeowl
left a comment
There was a problem hiding this comment.
This implementation looks kind of silly, since it suspends the insertions till the end. A monadic version can build the result sequence eagerly as it goes.
Thus far, this proposal has gotten good reception on the libraries
list.