Reputation: 7653
What is the easiest way to count the number of elements in a sequence in F#?
Upvotes: 27
Views: 11212
Reputation: 17119
Use Seq.length
Returns the length of the sequence
Upvotes: 54
Reputation: 118865
FYI, if you search the library docs for Seq for "-> int" you'll find this rather quickly.
-> int
Upvotes: 6
Reputation: 59
you can use Seq.length
Upvotes: 5
Reputation: 13897
open System.Linq mySeq.Count()
Upvotes: 8