mirror of
				https://github.com/KevinMidboe/linguist.git
				synced 2025-10-29 17:50:22 +00:00 
			
		
		
		
	
		
			
				
	
	
		
			18 lines
		
	
	
		
			444 B
		
	
	
	
		
			Swift
		
	
	
	
	
	
			
		
		
	
	
			18 lines
		
	
	
		
			444 B
		
	
	
	
		
			Swift
		
	
	
	
	
	
| enum Suit {
 | |
|     case Spades, Hearts, Diamonds, Clubs
 | |
|     func simpleDescription() -> String {
 | |
|         switch self {
 | |
|             case .Spades:
 | |
|                 return "spades"
 | |
|             case .Hearts:
 | |
|                 return "hearts"
 | |
|             case .Diamonds:
 | |
|                 return "diamonds"
 | |
|             case .Clubs:
 | |
|                 return "clubs"
 | |
|         }
 | |
|     }
 | |
| }
 | |
| let hearts = Suit.Hearts
 | |
| let heartsDescription = hearts.simpleDescription()
 |