pathTokens match {
case List("post") => ("post", "index")
case List("search") => ("search", "index")
case List() => ("home", "index")
} match {
case (controller, action) => loadController(http, controller, action)
case _ => null
}
Ich wollte zusammenhängende Übereinstimmung. aber Kompilierfehler. :(Scala zusammenhängende Übereinstimmung
(pathTokens match {
case List("post") => ("post", "index")
case List("search") => ("search", "index")
case List() => ("home", "index")
}) match {
case (controller, action) => loadController(http, controller, action)
case _ => null
}
Als ich eingewickelt ersten Spiel mit parenparenthesis, ist es ok arbeitete Warum ich Klammer hier brauchen
Sie hilfreich Kommentar Dank. – drypot