The principle of least power designs a program with only the functionality required to accomplish its job. Restricting available effects narrows what the program can do, improving local reasoning and reuse. section 13.6
Restricting effect capabilities
A Free program over Console can interact with the console but cannot read files. Adding Files permits file access while still excluding database and network operations. The type records these capabilities explicitly. section 13.6
trait Console[F[_]]: def readLn: F[Option[String]] def printLn(line: String): F[Unit]
A Console capability exposes only reading and printing, allowing programs such as greet to depend on console operations without knowing the target monad. section 13.6
Capability traits offer a direct alternative to constructing Free programs and interpreting them later: each trait names the permitted operations, while instances supply their implementation for a target monad. section 13.6
