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
If you love us? You can donate to us via Paypal or buy me a coffee so we can maintain and grow! Thank you!
Donate Us With