Sum, max and min in a stream Write a program for computing the sum, max and min of the given stream via primitive specializations of Stream and Stream.reduce().