Introduction
In this post we are going to look at Computation Expressions including a first look at asynchronous code in F#. It's hard to explain what they are other than syntactic sugar for simplifying code around effects like Option, Result and Async. We have actually already met one in a previous post: seq {}.
In this post we will start to learn how to use Computation Expressions, create our own simple one and look at a more complex example where we combine two effects together - Async and Result.
Setting Up
You can use any IDE. I will be using VSCode plus the ionide plugin.
Open VSCode in a new folder called ComputationExpressionDemo.
Open a new Terminal and create a new console app using: