KnowledgeHub
Questions
Tags
Users
Search
Alex Rivera
|
Logout
Edit Question
Title
Body
I'm just beginning F# so please be kind if this is basic. I've read that a function marked lazy is evaluated only once and then cached. For example: let lazyFunc = lazy (1 + 1) let theValue = Lazy.force lazyFunc Compared to this version which would actually run each time it's called: let eagerFunc = (1 + 1) let theValue = eagerFunc Based on that, should all functions be made lazy? When would you not want to? This is coming from material in the book "Beginning F#" .
Tags (comma-separated)
Save Edits
Cancel