Kroppeb
07/28/2019, 10:18 PMNothing
. This doesn't happen if assigned to a new var/vallouiscad
07/28/2019, 10:51 PMKroppeb
07/29/2019, 9:20 AMlouiscad
07/29/2019, 9:30 AMlouiscad
07/29/2019, 9:31 AMNothing
type.louis993546
07/29/2019, 6:05 PMoverride fun next(): T {
val currNext = curr.next
if (currNext == null) {
throw NoSuchElementException() // <- "returns" a value. This is OK
} else {
curr = currNext // <- this is just a statement
}
}
louis993546
07/29/2019, 6:06 PMreturn
in return it.value
is not actually to next()
, but the closure of let {}
Kroppeb
08/01/2019, 4:38 PMKroppeb
08/01/2019, 4:39 PM