Created
July 18, 2019 17:33
-
-
Save parzibyte/b7c72259c71fae10e2c7d3db7a7d58d3 to your computer and use it in GitHub Desktop.
Funciones de una línea en Kotlin https://parzibyte.me/blog
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// Definir la función | |
fun sumar(numero1: Int, numero2: Int) = numero1 + numero2 | |
// Invocarla | |
val resultado = sumar(20, 1) |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment