Seq count number of elements
What is the easiest way to 开发者_运维技巧count the number of elements in a sequence in F#?
Use Seq.length
Returns the length of the sequence
open System.Linq
mySeq.Count()
...and hope it's finite
FYI, if you search the library docs for Seq for "-> int
" you'll find this rather quickly.
you can use Seq.length
精彩评论