Channels are mysterious for many Kotlin developers. While they power a lot of the higher-level coroutine APIs, there are also times when it makes sense to use them directly!
Got a callback-based library in your Kotlin code? Don't litter your main project code with them! Instead, just create a thin adapter layer that converts them to coroutines. I'll show you how.
Kotlin 2.4 finally introduces Collection Literals, so that we can declare our collections with brackets instead of manually calling functions. And when we put them together with the new name-based destructuring feature, we end up with a particularly cool effect.
Aprende todo sobre las funciones en Kotlin de manera divertida y fácil, con muchos ejemplos e ilustraciones. ¡Cuerpos de expresión, cuerpos de bloque, argumentos nombrados, valores predeterminados y mucho más!
¿Quieres ser desarrollador de Kotlin? ¡Estás en el lugar correcto! Tu aventura comienza aquí en el capítulo 1, donde cubriremos lo básico de variables, expresiones y tipos.