Comment

Comment by throwaway4good

What you write could be written as:

   ...stream().
     map(e -> e.getKey().getPrice().multiply(new BigDecimal(e.getValue()))).
     reduce(BigDecimal.ZERO, BigDecimal::add)
The problem here is not the use of streams but that the author goes at the problem in a confusing and round about way.

Discussion

Live from the official Hacker News API

A modern reader for Hacker News · SvelteKit + Skeleton