In
val echo = Action { request =>
Ok("Got request [" + request + "]")
}
It seems Action is a function, have one function type parameter, it's type is Request[A] => Result
In the doc:https://www.playframework.com/documentation/2.7.x/api/scala/play/api/mvc/Action.html
It tell me Action is a trait:
trait Action[A] extends EssentialAction
"An action is essentially a (Request[A] => Result) function that handles a request and generates a result to be sent to the client."
so what the Action really is? a function, or a trait?