Skip to content

Instantly share code, notes, and snippets.

@shinokada
Created May 1, 2014 02:23
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 shinokada/11443318 to your computer and use it in GitHub Desktop.
Save shinokada/11443318 to your computer and use it in GitHub Desktop.
[[0, 0, 3], [0, 1, 4], [1, 0, 5], [1, 1, 6]].select{ |i, j, k| p "#{ i } is #{ j } is #{ k }" }
# "0 is 0 is 3"
# "0 is 1 is 4"
# "1 is 0 is 5"
# "1 is 1 is 6"
# => [[0, 0, 3], [0, 1, 4], [1, 0, 5], [1, 1, 6]]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment