Skip to content

Instantly share code, notes, and snippets.

@Raynes Raynes/gist:212339
Created Oct 17, 2009

Embed
What would you like to do?
class Integer
def expo(n)
(1..n).inject {|acc| acc += self * self} - 1
end
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
You can’t perform that action at this time.