Skip to content

Instantly share code, notes, and snippets.

@mchmielarz
Last active March 14, 2019 21:38
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save mchmielarz/c5139ca477ccab9621d683862fafe8c4 to your computer and use it in GitHub Desktop.
Save mchmielarz/c5139ca477ccab9621d683862fafe8c4 to your computer and use it in GitHub Desktop.
for-comprehension: methods providing data
private Option<Body> body() {
 return Some(new Body());
}
private Option<Wheels> wheels() {
 return Some(new Wheels());
}
private Option<Engine> engine() {
 return Some(new Engine());
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment