Skip to content

Instantly share code, notes, and snippets.

@tonyklawrence
Created June 17, 2012 16:00
Show Gist options
  • Save tonyklawrence/2944941 to your computer and use it in GitHub Desktop.
Save tonyklawrence/2944941 to your computer and use it in GitHub Desktop.
Some test
List<Integer> numberList = asList(1, 2, 3, 4, 5);
// old style
transform(numberList, byHalf());
// fluent interface
FluentIterable numbers = from(numberList);
numbers.transform(byHalf());
// assume byHalf() returns us a Guava Function<Integer,Integer>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment