public final static < T , R > R foldMap ( final Stream < T > stream , final Function < ? super T , ? extends R > mapper , final Monoid < R > reducer ) { return reducer . foldLeft ( stream . map ( mapper ) ) ; }
Attempt to transform this Stream to the same type as the supplied Monoid using supplied function Then use Monoid to reduce values