Swift/swift 문법

[swift] 타입의 종류

Lyla. 2023. 5. 13. 03:05

Swift에서의 타입은 두가지로 나뉜다. 

 

Named Type

ex.Int String 등

 

Compound Type

ex. (Int) -> Bool

 : 타입을 조합해서 사용한 것 (함수타입, 튜플)

 

출처: https://docs.swift.org/swift-book/documentation/the-swift-programming-language/types/