Skip to content

Instantly share code, notes, and snippets.

@eggplants
Created March 25, 2019 08:06
Show Gist options
  • Save eggplants/cc38be7d75e5b06d9113130ee7508702 to your computer and use it in GitHub Desktop.
Save eggplants/cc38be7d75e5b06d9113130ee7508702 to your computer and use it in GitHub Desktop.
a.zip(b).map{|n,p| n*p}
#or
a.sort_by{ |b0, b1|b0}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment