take a look at Seq.countBy as documented in:

[link:research.microsoft.com]

sample code:

1
2
3
4
5
> > let wordList = ["three";"two";"one";"three";"two";"three"];;
val wordList : string list

> wordList |> Seq.countBy (fun x -> x);;
val it : seq<string * int> = seq [("three", 3); ("two", 2); ("one", 1)]

hope this helps

By on 3/2/2008 8:29 PM ()
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