Skip to content

Instantly share code, notes, and snippets.

@pumpkincouture
Created August 28, 2014 15:15
Show Gist options
  • Save pumpkincouture/2a1f9b266f3699d62794 to your computer and use it in GitHub Desktop.
Save pumpkincouture/2a1f9b266f3699d62794 to your computer and use it in GitHub Desktop.
def refine_pairs(list)
new_sentence = []
list.each do |sub_array|
sub_array.each do |sentence|
split = sentence.split(" ")
new_sentence << split
end
end
new_sentence
end
def matching_pairs?(list)
list.each do |array|
return true if array[1] == array[4]
end
false
end
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment