Last active
August 29, 2015 14:05
-
-
Save yunchih/cdd63f09129342242d46 to your computer and use it in GitHub Desktop.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
//It is often useful to mark the request parameter as implicit so it can be implicitly used by other APIs that need it | |
Action { implicit request => | |
Ok("Got request [" + request + "]") | |
} | |
// Q1: "it can be implicitly used by other APIs" --> Any examples? | |
// Q2: If the parameter of a method is marked "implicit", client needn't | |
// provide such parameter since the compiler will find it themselves, right? | |
// But I'm not able to apply this rule to the above example. | |
// What if Action is called without any parameter, i.e. " Action() "? | |
// What will happen? |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment