Skip to content

Instantly share code, notes, and snippets.

@panphora
Last active September 19, 2019 18:01
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 panphora/46279929015f82c914c7d8c3f9c40ba2 to your computer and use it in GitHub Desktop.
Save panphora/46279929015f82c914c7d8c3f9c40ba2 to your computer and use it in GitHub Desktop.
import java.util.stream.IntStream;
class Main {
public static void main(String[] args) {
System.out.println(IntStream.range(1,5).map(n -> n*2).reduce(1, (a,b)->a+b));
}
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment