Skip to content

Instantly share code, notes, and snippets.

@elomar
Forked from tautologico/somapares.ml
Created April 18, 2011 00:12
Show Gist options
  • Save elomar/924627 to your computer and use it in GitHub Desktop.
Save elomar/924627 to your computer and use it in GitHub Desktop.
def somapares(*pares)
pares.map {|par| par[0] + par[1]}
end
somapares [1, 5], [4, 7]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment