function with curly braces kotlin code example
Example: kotlin curly braces after function call
// put whole lambda in parentheses
list.any({ i: Int -> i > 0 })
// if its the last parameter, you can move lambda out of parentheses
list.any() { i : Int -> i > 0}
// if its the only parameters, you can remove parentheses
list.any { i: Int -> i > 0 }
// if lambda has the only argument, you can replace its name with 'it'
list.any{ it > 0 }