F# Computation Expressions Workshop
The Computations Expressions Workshop collects and presents the content of several papers and presents the material as a set of tutorials. This content is intended to be used in a workshop setting.
The workshop uses the dotnet
CLI as a base case. However, attendees may
elect to use an editor of their choice, though the steps to use those tools
will be omitted from the tutorials.
dotnet
dotnet
CLI through the .NET Core SDK
NOTE: Some IDEs will also install the dotnet
CLI.
git clone
Workshop RepositoryClone the workshop repository so you have the materials available locally.
Each tutorial is also tagged so that you can reference the finished result if you get stuck.
git clone https://github.com/panesofglass/computation-expressions-workshop
Now that you have the basics, you can get started by creating a new project with Expecto.
dotnet new -i Expecto.Template
dotnet new expecto -lang fsharp
let
and do
with extensions: let!
, do!
, return
, etc.query { for x in source do select x }
OptionBuilder
Return
Bind
Delay
Run
ning a delayed computationdo!
with a unit
result using Combine
if ... then
without an else
ChoiceBuilder
StateBuilder
StackBuilder
Yield
= Return
For
= Bind
Delay
TryWith
TryFinally
Using
While
Quote