Skip to content

Instantly share code, notes, and snippets.

Created March 2, 2014 17:58
Show Gist options
  • Save anonymous/9b24217737e8246828e2 to your computer and use it in GitHub Desktop.
Save anonymous/9b24217737e8246828e2 to your computer and use it in GitHub Desktop.
def increment(x)
puts "inside increment function, incrementing #{x}"
x+1
end
a = increment(1)
b = increment(2)
puts "This is 1+1: #{a}"
puts "This is 2+1: #{b}"
puts "This is 4+1: #{(b+2) }"
puts "This is #{(b*2)}"
increment(11)
increment(12)
puts "#{a}"
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment