Swift中關於函數有這樣的介紹
Functions are a first-class type. This means that a function can return another function as its value.
函數是先類類型?意味着一個函數可以將另一個函數當作它的返回值返回。
看看 stackoverflow上關於這個的解釋
Usually it means instances of T can be
Eg functions in C are not first class types as they cannot be constructed at runtime, but they are in JavaScript. In some specialised circumstances, for example theorem proving, it means that types themselves are first class objects. More modern literature uses 'reified types' instead to denote this to avoid such ambiguity. |
??????