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?