Skip to content

Instantly share code, notes, and snippets.

@becek2n
Created May 8, 2020 15:58
Show Gist options
  • Save becek2n/a51d96ba3fedcaa8b055995832656ac7 to your computer and use it in GitHub Desktop.
Save becek2n/a51d96ba3fedcaa8b055995832656ac7 to your computer and use it in GitHub Desktop.
List<T> map<T>(List list, Function handler) {
List<T> result = [];
for (var i = 0; i < list.length; i++) {
result.add(handler(i, list[i]));
}
return result;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment