Skip to content

Instantly share code, notes, and snippets.

@isokissa
Created February 20, 2016 16:50
Show Gist options
  • Save isokissa/593898bf0f025846086e to your computer and use it in GitHub Desktop.
Save isokissa/593898bf0f025846086e to your computer and use it in GitHub Desktop.
Reversing the stream in Java8
static IntStream revRange(int from, int to) {
return IntStream.range(from, to).map(i -> to - i + from - 1);
}
@isokissa
Copy link
Author

Origin: [http://stackoverflow.com/a/34621495]

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment