Created
August 3, 2019 16:06
-
-
Save vamsitallapudi/f3f0c3df7e597d3266ad35f016f60c78 to your computer and use it in GitHub Desktop.
This file contains hidden or 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
val list = listOf(1, 3, 5, 7, 9) | |
// if the lambda expression is the last parameter, we can move the parameter out | |
println(list.fold(1) { a, b -> a * b }) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment