title: Case class apply method, What does this syntax means?
body: <p>I am trying to use Scala + Play 2.4.2 on a side project, I was writing a json parser and IntelliJ suggested this fix for my syntax.</p>
  
  <p>I can't understand what this means</p>
  
  <p>For me this <code>(Person.apply, _)</code> should be written <code>(Person.apply _)</code>, but like that I get a <code>cannot resolve symbol apply</code> and the code does not compile.</p>
  
  <p>Since I have an overloaded constructor shouldn't <code>(Person.apply _)</code> call it with the parameters from the <code>valuereads</code> function?</p>
  
  <pre><code>package models
  
  import play.api.libs.json._
  import play.api.libs.functional.syntax._
  
  case class Person(id: Long = 0, name: String, age: Int){
    def this(name: String, age: Int) = this(0, name, age)
  }
  
  object Person {
  
    implicit val personFormat = Json.format[Person]
  
    implicit val valuereads = (__ \ "value").read {(
    (__ \ "name").read[String] and
    (__ \ "age").read[Int]
     )(Person.apply, _)   //**&lt;=== THIS, what apply, _ stands for**
  
    def apply(name: String, age: Int) = new Person(name, age)
  }
  </code></pre>
  
  <p>The fixed syntax still does not compile, but I get no warnings. What am I doing wrong here?</p>
  
  <p>BTW I am following this info : <a href="https://www.playframework.com/documentation/2.4.x/ScalaJsonCombinators" rel="nofollow">https://www.playframework.com/documentation/2.4.x/ScalaJsonCombinators</a></p>