- Swift Functional Programming(Second Edition)
- Dr. Fatih Nayebi
- 73字
- 2021-07-02 23:54:28
Methods
Methods are functions that are associated with a particular type. Instance methods are functions that are called on an instance of a particular type. Type methods are functions that are called on the type itself.
The following example presents a class containing a type method that is named someTypeMethod():
class AClass {
class func someTypeMethod() {
// type method body
}
}
// We can call this method as follows:
AClass.someTypeMethod()
推薦閱讀
- PyTorch深度學習實戰:從新手小白到數據科學家
- 數據之巔:數據的本質與未來
- Python數據分析入門:從數據獲取到可視化
- 云計算環境下的信息資源集成與服務
- App+軟件+游戲+網站界面設計教程
- 企業大數據系統構建實戰:技術、架構、實施與應用
- Sybase數據庫在UNIX、Windows上的實施和管理
- The Game Jam Survival Guide
- 白話大數據與機器學習
- Apache Kylin權威指南
- Chef Essentials
- R Object-oriented Programming
- 數據修復技術與典型實例實戰詳解(第2版)
- 大數據技術原理與應用:概念、存儲、處理、分析與應用
- 從Lucene到Elasticsearch:全文檢索實戰