stacycurl / pimpathon

Adds useful methods to scala & java classes.
Apache License 2.0
35 stars 9 forks source link

Add ApplyTraversal[S, T, List[A], List[B]].modifyCollect(A ~> B): T #253

Open stacycurl opened 8 years ago

stacycurl commented 8 years ago

Here's a more specific one:

implicit class ApplyTraversalListFrills[From, A](val value: ApplyTraversal[From, From, List[A], List[A]]) { def modifyCollect(pf: PartialFunction[A, A]): From = value.modify(_.collect(pf)) }