interface Store { Query() }
// these all have the Query() method
type/class MySQL implements Store
type/class Cache implements Store
type/class Logger implements Store
var db Store
db = new Logger(new Cache(new MySQL()))
interface Store { Query() }
// these all have the Query() method
type/class MySQL implements Store
type/class Cache implements Store
type/class Logger implements Store
var db Store
db = new Logger(new Cache(new MySQL()))