You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
I'm not sure either of these pulls their weight. From containers, I would tend to expect a more efficient way to figure out whether they contain an element. And I'm not sure how often it is useful whether a sequence contains an element, while also throwing out the sequence (note that not all iterators are re-startable and even for those that are, I'd expect a linear search to be expensive enough that it's useful not to just throw away the state if you found what you where looking for). They might be worthwhile, but ISTM that should come with some evidence (in particular, we probably want to wait a bit to gather experience with iterators, before building up a humongous library of iteration-manipulators - in my experience Go's iterators are just generally less useful than in other languages).
Independent from that, I don't think we should have both Find and FindMap. Either form can be pretty easily expressed using the other (potentially using Map/Map2).
Proposal Details
Proposed add below functions:
The text was updated successfully, but these errors were encountered: