title: What is the purpose of Ruby array's methods assoc and rassoc?
body: <p>I've read the documentation of the methods <code>assoc</code> and <code>rassoc</code> of Ruby <code>array</code>. I understand what they do. They both work on arrays of arrays. <code>assoc</code> returns the array whose first element equals the provided parameter, and <code>rassoc</code> does the same, but for the second element.</p>
  
  <p>My question is what are these methods for? This functionality is very specific. I'm guessing there is some reason why these methods were created. what is it?</p>