Hacker News
new
|
past
|
comments
|
ask
|
show
|
jobs
|
submit
login
smarks
on April 7, 2015
|
parent
|
context
|
favorite
| on:
C++ Streams
Yes, you do. :-) Alternative Java 8 solution:
int total = IntStream.rangeClosed(1, 10).map(x -> x*x).sum();
Guidelines
|
FAQ
|
Lists
|
API
|
Security
|
Legal
|
Apply to YC
|
Contact
Search:
int total = IntStream.rangeClosed(1, 10).map(x -> x*x).sum();