Skip to content
New this month 24 fresh C++, C#, F#, JavaScript, TypeScript and Lua courses just landed. Browse new releases Use code WELCOME10 for 10% off your first order · 14-day refund

F# Computation Expressions and Type Providers Explained

Demystify the two F# features that look like magic and start writing your own.

Rated 4.0 out of 5 from 2 reviews 41 students

JB Created by Jonas Berg

  • Last updated August 2026
  • English
  • 2h 22m of material
  • 18 lessons

What you will learn

6 concrete outcomes

Every bullet below is something you will have built, shipped or be able to explain by the time you finish the last lesson.

  • Explain exactly how the compiler desugars a computation expression into builder calls
  • Implement Bind, Return, Zero, Combine, Delay, For and Using in your own builder
  • Write option, result and validation builders that read like ordinary code
  • Use the built-in async and task expressions with a correct mental model
  • Generate strongly typed access to JSON and CSV with FSharp.Data
  • Query a relational database through SQLProvider with compile-time schema checking

Course curriculum

4 modules · 18 lessons · 2h 22m of material

5 lessons running 38m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.

Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.

6 lessons running 48m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.

Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.

3 lessons running 24m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.

Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.

4 lessons running 32m in total. Each lesson ships with the finished source files and a short written recap, so you can follow along in your own editor and skim the module again later.

Lesson-by-lesson titles, code downloads and exercises live inside the course library you get access to straight after checkout.

4 modules · 18 lessons

2h 22m total length

Requirements

Short list, and deliberately so. If you meet these you can start today.

  • Comfortable writing F# functions, records and discriminated unions
  • The .NET SDK with F# tooling installed

About this course

Computation expressions are the point where F# stops looking like a friendlier C# and starts looking like something else entirely. The syntax is small, the mechanism is mechanical, and once you have written a builder by hand the mystery disappears permanently. This focused course takes you there in a single sitting.

You build up from the simplest possible builder, implementing Bind and Return, then watch the compiler desugar your expression step by step. From there come the members that matter in practice: Zero, Combine, Delay, For, While, TryWith and Using, each added only when an example demands it. You then write three real builders, an option builder, a result builder that short-circuits on the first error, and a validation builder that accumulates all errors instead.

The second half covers type providers, the feature that generates types from external schemas at compile time. You use FSharp.Data over JSON and CSV, and SQLProvider over a real database, then examine the trade-offs honestly: schema drift, build-time dependencies and where a provider is the wrong answer.

Topics covered

Frequently asked questions

Still unsure about something? Write to misteryjj100@gmail.com and a human answers, usually the same working day.

No, and the word barely appears. The course works from the compiler transformation upward, which is a more useful model for writing builders that work.

FSharp.Data and SQLProvider are actively maintained and used in production. The course is candid about their build-time trade-offs and when to prefer generated code instead.

PostgreSQL running in a container, with a SQLite alternative provided. Both connection strings and the schema script are in the resources.

Checkout is handled on our provider's secure payment page. The moment your payment clears we email your personal access link and access code to the address you used at checkout, and the same link appears in your account library. There is nothing to install and nothing to wait for.

Email misteryjj100@gmail.com within 14 days of your purchase, quote your order number, and we refund the full amount to your original payment method. No form to fill in and no questions about how much of the course you watched.

What students say

Reviews are written by people who bought this course. We publish the critical ones too.

4.0

Rated 4.0 out of 5

Course rating · 2 reviews

Rating distribution

  • 5 stars 50%
  • 4 stars 0%
  • 3 stars 50%
  • 2 stars 0%
  • 1 star 0%
  • EH

    Eirik Haugen

    F# developer

    Mar 2026
    Rated 5.0 out of 5

    Desugaring first is the only way

    Showing what a let-bang actually compiles down to, before a single builder gets written, is what separates this from every blog post on the subject. I wrote a validation builder from memory straight afterwards, which I would not have believed possible that morning.
  • MS

    Marta Silva

    .NET developer

    Sep 2025
    Rated 3.0 out of 5

    The second half feels bolted on

    The computation expression chapters are excellent and would be four or five stars on their own. Type providers then get one chapter that demonstrates the JSON provider against a tidy sample file and stops. Nothing on what happens when the schema shifts underneath you, nothing on how any of this behaves on a build server without network access. Half a course on a genuinely hard topic, and half a demo.

Your instructor

JB

Jonas Berg

Functional programmer and F# instructor

  • 64 students taught
  • 3 courses published
  • 4.0 instructor rating
  • F#
  • Functional programming
  • Type-driven design
  • Domain modelling

Jonas has written F# in production for over a decade, mostly in insurance and logistics where correctness is far cheaper than speed. He teaches functional programming as a practical tool: types that make bad states unrepresentable, and pipelines you can test without touching a database. His courses convert real imperative code into functional code one step at a time, so nothing feels like a leap of faith. He maintains a small but well-used F# validation library.

$11 USD

One-time payment · lifetime access

The WisdomCharms dispatch

One useful email a week. No fluff, no spam.

New course releases, discount codes before anyone else, and a short, practical breakdown of one technique — a prompt pattern, a C++ idiom, a TypeScript trick — that you can use the same day.

  • Subscriber-only launch pricing
  • Unsubscribe in one click
  • We never sell your address

By subscribing you agree to our Privacy Policy. Questions? Write to misteryjj100@gmail.com.