if+isif myCat is Cat{
...
}
func+guard+isfunc isCat{
//Cat이 아닌 경우
guard myCat is Cat else{
...
return
}
//Cat인 경우
...
}
switch + isswitch myCat{
case is Dog:
...
case let myKitty as Cat:
...
}
if + case + is//자료형이 앞에 옴 주의
if case is Cat = myCat{
...
}
func + guard + case + isfunc isMyCat{
guard case is Cat = myCat else{
...
return
}
...
}