One easy way is to filter the ones equalling the target value (via Seq.filter) and then count (via Seq.length) the resulting sequence:

1
2
3
4
5
6
7
 

let aTuple= (0.0, 0, 0L)
let arrayTuples = [|(1.0, 1, 1L);(2.0, 2, 2L);(0.0, 0, 0L);(0.0, 0, 0L)|]
arrayTuples |> Seq.filter (fun t -> t = aTuple) |> Seq.length |> printfn "%d"

[link:msdn.microsoft.com]

By on 1/9/2010 4:00 PM ()

Hello, Brianmcn:
Thank you very much, your code works.
Thanks and have a nice day!

By on 1/10/2010 12:51 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper