Skip to content

Instantly share code, notes, and snippets.

@bcardiff
Last active March 21, 2016 18:02
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bcardiff/9ad08d2e217cef7691a6 to your computer and use it in GitHub Desktop.
Save bcardiff/9ad08d2e217cef7691a6 to your computer and use it in GitHub Desktop.
def ej(a, b)
size = [a.size, b.size].min
a[0...size].zip(b[0...size])
.map { |e| e.max }
.map(&.+(4))
.select(&.>=(10))
.sum
end
ej [1,5,3,4], [5,3,6]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment