title: Ramda - find objects that match from arrays
body: <p>From the two following lists <code>list1</code> and <code>list2</code>, I need to return the objects from <code>list1</code> that match the values of <code>head</code> and <code>tail</code> from <code>list2</code>.</p>
  
  <p>I was trying to achieve this using <code>ramdajs</code>.</p>
  
  <pre><code>const list1 = [ 
    { tail: 'A', head: 'B', distance: '5' },
    { tail: 'B', head: 'C', distance: '4' },
    { tail: 'C', head: 'D', distance: '8' },
    { tail: 'D', head: 'C', distance: '8' },
    { tail: 'D', head: 'E', distance: '6' },
    { tail: 'A', head: 'D', distance: '5' },
    { tail: 'C', head: 'E', distance: '2' },
    { tail: 'E', head: 'B', distance: '3' },
    { tail: 'A', head: 'E', distance: '7' } 
  ]
  
  const list2 = [ { tail: 'A', head: 'B' }, { tail: 'B', head: 'C' } ]
  
  // result should be [{ tail: 'A', head: 'B', distance: '5' },
  // { tail: 'B', head: 'C', distance: '4' }] from list1
  </code></pre>