Skip to content

Instantly share code, notes, and snippets.

@corani
Created March 30, 2011 05:41
Show Gist options
  • Save corani/893918 to your computer and use it in GitHub Desktop.
Save corani/893918 to your computer and use it in GitHub Desktop.
Map
List<Integer> result = new ArrayList<Integer>();
for (Integer value : items) {
result.add(Math.pow(value, 2));
}
result = map(lambda x: x ** 2, items)
SELECT value * value FROM items
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment