Last active
May 22, 2018 18:09
-
-
Save dineshba/46dc7586cfd9a01ba62e21febdaffcc5 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
struct Square { | |
let size: Int | |
var area: Int { // var computedProperty: ReturnType { | |
return size * size // return (compute from other instance variables) | |
} // } | |
var perimeter: Int { | |
return 4 * size | |
} | |
} |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment