Home » F# lazy computation

F# lazy computation

by Online Tutorials Library

F# Lazy computation

Lazy computation is a feature of F#. Lazy computation does not evaluate immediately. It is executed when result is needed. It can help to improve performance of your code.

Syntax

In the above code, expression is the code that is evaluated only when it required. F# uses force method to perform lazy computation.


F# Lazy Computation Example

Output:

20  

You may also like