Free Monad
What is a Free Monad?
type Program<'a> =
| Free of Instruction<Program<'a>>
| Pure of 'a
module Program =
let rec bind f = function
| Free inst -> inst |> Instruction.map (bind f) |> Free
| Pure x -> f xSeparating Instructions by Domain
Folder Structure
Instruction Types and Map Functions
The Improved Program Type
Instruction Helpers
Working with Domain Errors
Validation Error Helpers
Query Helpers
Unit Testing Workflows
The Hook Types
Test Interpreter
Test Helpers
Example Test
Limitations
Last updated