from effectful code. ▶ in OO parlance: “Domain-driven design” ▶ But how do we structure effectful code? ▶ database access ▶ web requests ▶ terminal I/O ▶ ... 21
extends Terminal[String] case class WriteLine(line: String) extends Terminal[Unit] ▶ Terminal is an ordinary class hierarchy ▶ nicely represents what we want ▶ But what to do with it? How do we compose it? 23
extends Terminal[String] case class WriteLine(line: String) extends Terminal[Unit] ▶ Terminal is an ordinary class hierarchy ▶ nicely represents what we want ▶ But what to do with it? How do we compose it? 23 It looks like you need a monad. Want help with that?
a basic fact about presheaves (a basic fact of topos theory): it says that every presheaf is a colimit of representables and more precisely that it is the “colimit over itself of all the representables contained in it”. ” – nLab 24
a basic fact about presheaves (a basic fact of topos theory): it says that every presheaf is a colimit of representables and more precisely that it is the “colimit over itself of all the representables contained in it”. ” – nLab 24