Skip to content

Instantly share code, notes, and snippets.

@fresh5447
Created February 19, 2014 21:35
Show Gist options
  • Save fresh5447/9102134 to your computer and use it in GitHub Desktop.
Save fresh5447/9102134 to your computer and use it in GitHub Desktop.
def reverse_plus_one(a)
a << a.first
a.reverse
end
p reverse_plus_one([1,2,3,4])
def pluses_everywhere(a)
a.join("+")
end
p pluses_everywhere([1,2,3])
def array_quantity_plus_one(a)
a.length + 1
end
p array_quantity_plus_one([1,2,3,4])
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment