If I remove I get this error
# announcements
p
If I remove I get this error
w
That's because an empty block still returns Unit, and
let
requires an expression to be returned. Without else, there's no expression. You can write
else { Unit }
to get rid of the warning, or use some other function that
let
, which doesn't require an expression, I think
also
would work for example
p
Thank you!
s
Pedro, you may be interested in this blog post I wrote. “Let’s also apply a run with Kotlin on our minds” by Anton Spaans https://link.medium.com/e5Mzajo9EZ
👍 3