title: Curried method call by infix notation
body: <p>I defined the following class like <code>scala.Predef.Ensuring</code>:</p>
  
  <pre><code>scala&gt; :paste
  // Entering paste mode (ctrl-D to finish)
  
  implicit class Doing[A](val self: A) extends AnyVal {
    def doing(body: =&gt; Unit): A = { body; self }
    def doWhen(pred: A =&gt; Boolean)(body: =&gt; Unit): A =
      doing{ if (pred(self)) body }
  }
  
  // Exiting paste mode, now interpreting.
  
  defined class Doing
  </code></pre>
  
  <p>but <code>doWhen</code> method doesn't work with infix notation.</p>
  
  <pre><code>scala&gt; "abc" doWhen(_ == "abc") { println("do") }
  &lt;console&gt;:13: error: missing parameter type for expanded function ((x$1) =&gt; x$1.$eq$eq("abc"))
         "abc" doWhen(_ == "abc") { println("do") }
                      ^
  
  scala&gt; "abc".doWhen(_ == "abc") { println("do") }
  do
  res1: String = abc
  </code></pre>
  
  <p>How to use <code>doWhen</code> by infix style?</p>