Skip to content

Instantly share code, notes, and snippets.

@dokipen
Created November 19, 2010 02:58
Show Gist options
  • Save dokipen/706070 to your computer and use it in GitHub Desktop.
Save dokipen/706070 to your computer and use it in GitHub Desktop.
Home value appreciation
$PER_YEAR = 1.07
def appreciate(value, years)
return value if years == 0
appreciate(value * $PER_YEAR, years - 1)
end
# my home was sold for 52k in 95'
puts appreciate(52000, 16)
# >> 153512.514925401
# OK.. Only 6k underwater!
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment