Join Slack
Powered by
Can I apply the `reduce` function with an initial ...
# getting-started
s
sailxjx
01/13/2017, 6:47 AM
Can I apply the
reduce
function with an initial value? For example I want to calculate the character count of a list of string:
Copy code
val list = listOf(”abc”,”def") val sum = list.reduce {}
How to make the
sum
equal to 6?
2
Views
Open in Slack
Previous
Next