Skip to content

Instantly share code, notes, and snippets.

@yogeshmanghnani
Created April 9, 2018 18:54
Show Gist options
  • Save yogeshmanghnani/9b69d2ffcf77617e32e0078e9edc684e to your computer and use it in GitHub Desktop.
Save yogeshmanghnani/9b69d2ffcf77617e32e0078e9edc684e to your computer and use it in GitHub Desktop.
This is a vehicle structure in Swift for demonstration of Conditional Conformances
struct Vehicele: Movable {
var wheels: Int
var doors: Int
var tankCapacity: Double
var isMoving = false
func move() {
isMoving = true
print("The car is moving")
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment