Map-reduce operations based on Java8 spec