Skip to content

Instantly share code, notes, and snippets.

What would you like to do?
for-comprehension: Combining parts into a car using flatMap
final Option<Car> ourShinyCar =
b -> engine().flatMap(
e -> wheels().map(
w -> new Car(b, e, w)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment