Programming in Kotlin: Collections & Lambdas, Episode 8: Challenge: Practice Collections Iteration |

Practice iterating over two dimensional collections - matrices, and using exit-early strategies with break and continue.

This is a companion discussion topic for the original entry at

My solution

fun main(args: Array) {

fun sumInteger(list : List) : Long {
var sum = 0L
for(i in list) {
sum += i
return sum

Helllo Dmitry
Firstly, welcome to the course :]

Nice try with the challenge.
Looking at your solution, i can see that sumInteger() returns a Long but what is really expected is an Int since you’re passing in a list of integers when calling it inside the main function.

Feel free to always take a look at my solution after solving a challenge.
You might learn something new.

All the best in your Android journey :+1: