Recent comments

Paulo Coelho
Each of us has our own universe within ourselves. We're never going to be able …

college student
Don't worry, I got a 35% on my MATH 100 midterm a month ago, and …

Office Lady
I type quotes just to convince myself that I'm doing something productive when I should …

Elias
Are you kidding me, I got all the way to the second e in 'priceless' …

Paulo Coelho
aquello

More

kalmyk's quotes

All quotes

Dmitry Jemerov
Do you remember how children memorize the colors of the rainbow? "Richard Of York Gave Battle In Vain!" Imagine you need a function that gives you a mnemonic for each color (and you don't want to store this information in the enum itself). In Java you can use a switch statement for this. The corresponding Kotlin construct will be when. Like if, when is an expression that returns a value, so you can write a function with an expression body, returning the when expression directly.