Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@schveiguy
Last active February 22, 2016 02:54
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save schveiguy/56b142e389c8bd8d2b55 to your computer and use it in GitHub Desktop.
Save schveiguy/56b142e389c8bd8d2b55 to your computer and use it in GitHub Desktop.
Code for swift/d comparison
struct S
{
var x : Int // uses hidden storage
var xTimes10 : Int {
get {
return x * 10
}
set {
x = newValue / 10
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment