Deferring commitments: Tagless Final

A Repository interface
A service that makes use of the Forecast Repository interface
Instead of using the Future effect, we use an abstract F effect
How do you flatMap and map on F?

A brief introduction to typeclasses

Use implicits to automatically inject Addable instances
Make addableOrder an implicit value primed for automatic injection where applicable
Using the context bound instead of an implicit parameter

Using typeclasses to place constraints

“Constraints Liberate, Liberties Constrain” — Runar Bjarnason

Imposing constraints on F by demanding it has a Monad implementation
A cleaner looking API thanks to interface syntax

A simple in-memory implementation

An in-memory implementation of Order Repository that uses the Id Monad

A DynamoDB Future based implementation

A Future based implementation that makes use of DynamoDB (built on Scanamo)

A SQL Monix Task based implementation

A Monix Task based implementation that makes use of Postgres (built on Slick)

A word on constraints and granularity

Granular constraints


Source code

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

Recommended from Medium

Game from scratch with C++ and SFML (5)

Docker Compose Syntax: Volume or Bind Mount?

A gentle introduction to document digitization (Part 1)


What if I wanted to reproduce a build?

50 iOS Interview Questions And Answers Part 4

56-Spawning Enemies in Waves

Loup’s practice of writing unit tests

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
Calvin F

Calvin F

More from Medium

Announcing ‘Woof’, a pure Scala 3 logging library

Why use Cats IO instead of Scala Futures?

LeetCode Problem#1346 Check If N and Its Double Exist

A Philosophy of Testing 6: The Quest for Determinism