Navigation Menu

Skip to content

Instantly share code, notes, and snippets.

@cioccarellia
Created August 1, 2020 14:00
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 cioccarellia/4e2d05e78ea232f5f57975b75277c9b6 to your computer and use it in GitHub Desktop.
Save cioccarellia/4e2d05e78ea232f5f57975b75277c9b6 to your computer and use it in GitHub Desktop.
val engineCount = 2
val planeEngines = EngineFactory.generateFaultyEngines(engineCount).also {
println(it)
}
planeEngines.getOrNull(engineCount - 1)?.let {
println(it.cruiseSpeed)
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment