Hi,

Sequences are often the way to go. If you don't want to recompute the elements each time you go through the sequence, you can use Seq.cache.

If you want to use generators and yield, I suggest you convert your seq to a LazyList:

1
2
3
4
seq {
   for i = 1 to 10 do
       yield i, i * i
} |> LazyList.ofSeq

Laurent.

By on 4/7/2011 10:24 AM ()

Hi Laurent,

Thank you

By on 4/11/2011 5:56 AM ()
IntelliFactory Offices Copyright (c) 2011-2012 IntelliFactory. All rights reserved.
Home | Products | Consulting | Trainings | Blogs | Jobs | Contact Us | Terms of Use | Privacy Policy | Cookie Policy
Built with WebSharper