Divide and Conquer with Algebraic Structures



Fix me a Fixture

  1. Make some tiny functions
  2. Compose those tiny functions
Data for our fixtures
Our goal api

Composing with algebraic reasoning

We can swap out any algebraic data structure with another and preserve compositional reasoning.

Mapping Maps

Using Map
Using Traverse
Double traverse workflow

Plugging it together

Traverse our fixture data
Intermediate data structure of created records
Sequence our traversals





Love podcasts or audiobooks? Learn on the go with our new app.

Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store
Brian Lonsdorf

Brian Lonsdorf


More from Medium

Advanced TypeScript With Code Challenges: Conditional Types

Large elephant with Typescript logo and small elephant with JavaScript logo

TypeScript Compiler and Compiler API (Part 2)

Typescript, simple things you need to know

Using JavaScript Only, you can build <custom-counter> component