Can anyone please help me to understand below scala syntax?
def index = withAuth {
implicit request => userId =>
Ok(views.html.app.index())
}
Syntax taken from here.
My understanding is: withAuth is an Action and request is an input to anonymous function.
However I can't understand
- Two right hand operators (
=>) - From where it will receive
userIdvalue? - Is
userIdalso an input parameter to anonymous function?
Thanks