Skip to content

Instantly share code, notes, and snippets.

@codeaholicguy
Created December 16, 2015 08:16
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save codeaholicguy/94a8d883072600055b25 to your computer and use it in GitHub Desktop.
Save codeaholicguy/94a8d883072600055b25 to your computer and use it in GitHub Desktop.
List<Person> people = new ArrayList<>();
Consumer<Person> c1 = people::add;
Consumer<Person> c2 = System.out::println;
Consumer<Person> c3 = c1.andThen(c2);
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment