how to check if an element is contained within a sequence? I expected some Seq.contains, but i could not find it. Thanks
EDIT: Or, for an easier task, how to make the diff between two sequences? Like, getting all the elements within a list that doesn not belong to another (or that do)?
Seq.exists again, but with slightly different syntax -
See MSDN F#: Seq.exists function: https://msdn.microsoft.com/en-us/library/ee353562.aspx
Lots of other good ones there too!
Set
is your friend here:Danny
Little bit simpler:
Seq.exists
(Another question, another answer.)
This works, but I don't think that it's the most idomatic way to do it - (you'll need to wait until the US wakes up to find out):