Can someone explain the Scala code used in the Protected application value for the playframework zentask example:
def IsAuthenticated(f: => String => Request[AnyContent] => Result) = Security.Authenticated(username, onUnauthorized) { user =>
Action(request => f(user)(request))
}
I just started to learn Scala and cannot understand this sequence f: => String => Request[AnyContent] => Result. What does it mean? I cannot find examples in manuals that use a few =>instead of a list of parameters for a function.
What am I missing?
source
share