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

Popular posts from this blog

java - Oracle EBS .ClassNotFoundException: oracle.apps.fnd.formsClient.FormsLauncher.class ERROR -

c# - how to use buttonedit in devexpress gridcontrol -

nvd3.js - angularjs-nvd3-directives setting color in legend as well as in chart elements -