我想要应用依赖反转,这样mainApp就不必在每次模型改变时都重新构建(好吧,主要是因为它是一个很好的实践)。IModel | Model
因为我不得不在MainApp中创建模型,因为它是我的应用程序的开始,这将是多余的。我正在考虑将MainApp的内容转移到另一个类中,并将MainApp用作MainApp
是否有可能创建一个倒置的Range?for i in 99...1{
print("\(i) bottles of beer on the wall, \(i) bottles ofprint("Take one down and pass it around, \(i-1) bottles of beer on the wall.")