Once, you can test it easily via e.g.

1
2
3
    let x =
        printfn "hi"
        x + 1

and then reference x a few times. (Note also how this differs from a member property inside a class.)

By on 1/6/2011 10:31 AM ()

looks like the value is bound early on and the computation done only once under modules.

For classes, the computation happens each time the class is instantiated (and is not recomputed for that instance).

By on 1/6/2011 1:23 PM ()
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