Nylige kommentarer

Adolf Hitler
I thought someone wrote that yesterday, before I saw that title.

Jaime Beldrán del Río
Los comentarios que realizo aquí son poemas del ilustre Mario Benedetti; con él pienso en …

Jaime Beldrán del Río
No gaste las palabras no cambie el significado mire que lo que yo quiero lo …

Jaime Beldrán del Río
Somos la catástrofe Dice octavio que en latinoamérica los intelectuales somos la catástrofe, entre otras …

Jaime Beldrán del Río
Soy un caso perdido De manera que, como parece que no tengo remedio y estoy …

Mer

kalmyk's sitater

Alle sitater

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.