Use List.exists for contains#1518
Conversation
src/fsharp/lib.fs
Outdated
There was a problem hiding this comment.
@forki
This API look like exists rather than contains. Is it not misnamed? Perhaps we should name it exists and fix up the places where we use it by the wrong name.
exists: https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/list.exists%5b't%5d-function-%5bfsharp%5d
contains: https://msdn.microsoft.com/en-us/visualfsharpdocs/conceptual/list.contains%5b't%5d-function-%5bfsharp%5d
Kevin
There was a problem hiding this comment.
mhm after thinking about it. All the other listset functions have the first parameter f which is the projection. In this sense it makes sense to revert my last commit and keep it named contains.
There was a problem hiding this comment.
The real question is: can we use a different data structure!?
It needs to be a set that allows to pass in own equality semantics.
This reverts commit dc41206.
|
Looks good to me, thanks for this contribution Kevin |
No description provided.