Skip to content

Instantly share code, notes, and snippets.

@devjaime
Created March 21, 2021 05:03
Show Gist options
  • Select an option

  • Save devjaime/8f98698b607f2d13c3c3061d16213ec9 to your computer and use it in GitHub Desktop.

Select an option

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
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