scala - What is the purpose of the annotation after equal sign? -
there val in scala written this:
val todo = action { notimplemented[play.twirl.api.html](views.html.defaultpages.todo()) }
what purpose of action after equal sign?
that's alternative syntax for
val todo = action(notimplemented[play.twirl.api.html](views.html.defaultpages.todo()))
which in turn syntactic sugar for
val todo = action.apply(notimplemented[play.twirl.api.html](views.html.defaultpages.todo()))
Comments
Post a Comment