F # Syntax Question

A bit of a question about sytax ...

I have the following code in F #

let GetSumOfSequenceAttempt1 : bigint = seq{bigint(1)..bigint(10000000)} |> Seq.sum 

I'm not going to put numbers inside bigint () - is there any shorthand that makes this look look more neat?

+6
f #
source share
1 answer

Yes:

 let GetSumOfSequenceAttempt1 = seq { 1I .. 10000000I } |> Seq.sum 
+12
source share

All Articles