title: Filter & map an array with Ramda
body: <p>I am using Ramda to get the teams with <code>'Prem League'</code> in their categories array.
  My code looks like the following and it works.</p>
  
  <pre><code>import { pipe, map, filter } from 'ramda'   
  
  const teams = [
    {name: 'Liverpool', id: '1', categories: ['Prem League']},
    {name: 'Man Utd', id: '2', categories: ['Blue Square']},
    {name: 'Sheff Utd', id: '2', categories: ['Prem League']},
  ]
  
  const getTeamOptions = pipe(
      filter((team) =&gt; team.categories.includes('Prem League')),
      map((team) =&gt; ({ label: team.name, value: team.id }))
  );
  
  getTeamOptions(teams)
  </code></pre>
  
  <p>However I want to remove <code>team</code> as the argument for filter and <code>map</code>.</p>
  
  <p>I tried the following but got <code>prop(...).includes is not a function</code></p>
  
  <pre><code>filter(prop('categories').includes('Prem League')),
  </code></pre>
  
  <p>Ideally I would try and remove <code>team</code> from <code>map</code> too but maybe this is not necessary.</p>
  
  <p>The reason for these changes is that I have been following <a href="https://www.educative.io/courses/functional-programming-patterns-with-ramdajs" rel="nofollow noreferrer">this course</a> and it advises <code>prop</code> etc as best practices.</p>