Ok, So I need a list of all the positive integers. What first comes to mind is:
let numbers:Seq<bigint>=Seq.initInfinite n...
but initInfite isn't actually infitint: http://msdn.microsoft.com/en-us/library/ee370429.aspx (unlike bigint) its only: Int32.MaxValue = 2,147,483,647 which is nowhere near big enough.
Currently my plan is to replace the sequence with some kind of handmade class (possibly implimenting IEnumerable). It would be simple (and possibly more effiecint for my use) but i want to know how to do this
Seq.unfold (fun n -> Some(n, n + 1I)) 0I
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