Created
March 21, 2021 05:03
-
-
Save devjaime/8f98698b607f2d13c3c3061d16213ec9 to your computer and use it in GitHub Desktop.
Por ejemplo, aquí hay una función simple para calcular el cuadrado de un número
This file contains hidden or 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
| int square(int value) { | |
| // solo un simple ejemplo | |
| // podría ser una función compleja con mucho código | |
| return value * value; | |
| } | |
| // Dada una lista de valores, podemos mapearlos para obtener los cuadrados: | |
| const values = [1, 2, 3]; | |
| values.map(square).toList(); |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment