title: Filtering Lists in Scala's Monocle
body: <p>Given the following code:</p>
  <pre><code>case class Person(name :String)
  case class Group(group :List[Person])
  
  val personLens = GenLens[Person]
  val groupLens = GenLens[Group]
  </code></pre>
  <p>how can i &quot;filter&quot; out certain Persons from the selection, NOT by index but by a specific property of <code>Person</code>, like:</p>
  <pre><code>val trav :Traversal[Group, Person] = (groupLens(_.group) composeTraversal filterWith((x :Person) =&gt; /*expression of type Boolean here */))
  </code></pre>
  <p>I only found the <code>filterIndex</code> function, which does only include elements from the list based on the index, but this is not what I want.</p>
  <p><code>filterIndex</code> takes a function of type: <code>(Int =&gt; Boolean)</code></p>
  <p>and I want:</p>
  <p><code>filterWith</code> (made up name), that takes a <code>(x =&gt; Boolean)</code>, where x has the type of the element of the list, namely <code>Person</code> in this short example.</p>
  <p>This seems so practical and common that I assume somebody has thought about that and i (with my, i must admit limited understanding of the matter) don't see why it can't be done.</p>
  <p>Am I missing this functionality, is it not implemented yet or just plainly impossible for whatever reason (please do explain if you have the time)?</p>
  <p>Thank you.</p>