💎一站式轻松地调用各大LLM模型接口,支持GPT4、智谱、星火、月之暗面及文生图 广告
## 控制流(Control Flow) 推荐循环使用`for-in`表达式,而不使用`for-condition-increment`表达式。 推荐做法: ~~~ for _ in 0..<3 { println("Hello three times") } for (index, person) in enumerate(attendeeList) { println("\(person) is at position #\(index)") } ~~~ 不推荐做法: ~~~ for var i = 0; i < 3; i++ { println("Hello three times") } for var i = 0; i < attendeeList.count; i++ { let person = attendeeList[i] println("\(person) is at position #\(i)") } ~~~