Conditional branches of a ‘when’ expression in Kotlin
I need to write a Kotlin function that returns a result based on the outcome of a ‘when’ statement. For a trivial example, lets suppose my code looks like this:
I need to write a Kotlin function that returns a result based on the outcome of a ‘when’ statement. For a trivial example, lets suppose my code looks like this: