Skip to content

Instantly share code, notes, and snippets.

@swlaschin
swlaschin / MicrowaveApi_Implementation.fsx
Last active October 23, 2025 16:33
MicrowaveApi_Implementation
// ================================================
// Example: Implementation of the Microwave API
//
// To use, see comment at bottom of file
// ================================================
(*
This domain is all about using a Microwave oven.
The oven has:

Setup instructions for the 8 hour Domain Modeling Made Functional workshop

Requirements:

  • Git (optional)
  • F#

I will assume that you have git already installed.

Install F#

@swlaschin
swlaschin / DomainModelingMadeFunctional_outline.md
Last active November 11, 2023 11:40
Workshop outline: "Domain Modeling Made Functional"

Workshop: Domain Modeling Made Functional

Functional programming and domain-driven design might not seem to be a good match, but in fact functional programming can be an excellent approach to designing decoupled, reusable systems with a rich domain model. This workshop will show you why.

This will be a hands-on workshop designed for beginners in functional programming. We'll do lots of exercises and build some small projects that take us all the way from high-level design to low-level implementation.

@swlaschin
swlaschin / dmmf_workshop.md
Created January 5, 2021 13:16
"Domain Modeling Made Functional" workshop description

"Domain Modeling Made Functional" workshop

Functional programming and domain-driven design might not seem to be a good match, but in fact functional programming can be an excellent approach to designing decoupled, reusable systems with a rich domain model. This workshop will show you why.

This will be a hands-on workshop designed for beginners in functional programming. We'll do lots of exercises and build some small projects that take us all the way from high-level design to low-level implementation.

Who is this for?

This will be especially useful for people learning functional programming -- all concepts used in the workshop will be explained. Previous development experience is recommended.

@swlaschin
swlaschin / SixDependencyApproachesInPractice.fsx
Last active February 25, 2023 06:05
Code examples from fsharpforfunandprofit.com/posts/dependencies-5/
(* ===================================
Code from my series of posts "Six approaches to dependency injection"
=================================== *)
open System
(*
## The requirements
@swlaschin
swlaschin / DependencyRetention.fsx
Last active December 30, 2020 15:44
Code examples from fsharpforfunandprofit.com/posts/dependencies/
(* ===================================
Code from my series of posts "Six approaches to dependency injection"
=================================== *)
open System
(* ======================================================================
1. Dependency Retention
In which we don't worry about managing dependencies,
@swlaschin
swlaschin / DependencyInterpretation.fsx
Last active December 30, 2020 11:19
Code examples from fsharpforfunandprofit.com/posts/dependencies-4/
(* ===================================
Code from my series of posts "Six approaches to dependency injection"
=================================== *)
open System
(* ======================================================================
5. Dependency Interpretation
@swlaschin
swlaschin / DependencyParameterization.fsx
Last active December 30, 2020 11:16
Code examples from fsharpforfunandprofit.com/posts/dependencies-2/
(* ===================================
Code from my series of posts "Six approaches to dependency injection"
=================================== *)
open System
#load "Expecto.fsx" // from https://gist.github.com/swlaschin/38e21ff8d64ebe4e93e42fd288b486d5
(* ======================================================================
@swlaschin
swlaschin / DependencyInjection.fsx
Last active April 13, 2022 17:37
Code examples from fsharpforfunandprofit.com/posts/dependencies-3/
(* ===================================
Code from my series of posts "Six approaches to dependency injection"
=================================== *)
open System
(* ======================================================================
4. Dependency Injection
@swlaschin
swlaschin / DependencyRejection.fsx
Last active December 30, 2020 15:44
Examples from my post "Five approaches to dependency injection" at fsharpforfunandprofit.com/posts/dependencies/
(* ===================================
Code from my series of posts "Six approaches to dependency injection"
=================================== *)
open System
(* ======================================================================
2. Dependency Rejection