Skip to content

Instantly share code, notes, and snippets.

@yunchih
Last active August 29, 2015 14:05
Show Gist options
  • Save yunchih/cdd63f09129342242d46 to your computer and use it in GitHub Desktop.
Save yunchih/cdd63f09129342242d46 to your computer and use it in GitHub Desktop.
//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