Skip to content

Instantly share code, notes, and snippets.

@aloewright
Created August 6, 2013 22:23
Show Gist options
  • Select an option

  • Save aloewright/6169296 to your computer and use it in GitHub Desktop.

Select an option

Save aloewright/6169296 to your computer and use it in GitHub Desktop.
=begin
Enacting Enumerables; Method: Zip
Zip merges the elements by index from the passed arguments.
If the size of the two arrays is unequal, nil is returned.
=end
a = ['sam', 'alex', 'nick']
b = ['ali', 'ian', 'alejandro']
p a.zip(b)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment