Microsoft has introduced a while! keyword in its open source F# language, providing a refined approach to loops in computation expressions.
This keyword, spoken as “while bang,” is intended to minimize boilerplate, boost clarity, and enhance expressiveness, Microsoft said in a blog post on September 20. With while!, specifying an asynchronous condition in loops now is feasible. Microsoft cites the elimination of a mutant variable, a reduction in total lines of code, and a decrease in overall cyclomatic complexity as a result of while!. The while! construct does not require a builder method but instead invokes .Bind in the same manner as let! does; so there is no additional work needed when authoring new computation expressions. Constructs are composable and can be nested.
To read this article in full, please click here
InfoWorld