Map, reduce and group-by on collections

// Map
List<String> items = New.list("a", "bbbbb", "cc");["a","bbbbb","cc"] -> s.length());[1,5,2]
// Reduce
Do.reduce(items).by((a, b) -> a + ":" + b).orElse("");"a:bbbbb:cc"
Do.reduce(items).by("@", (a, b) -> a + ":" + b);"@:a:bbbbb:cc"
// Group-by -> s.length());{"1":["a"],"2":["cc"],"5":["bbbbb"]}

Project setup with Maven

To run the example, you need to create a new Java 8 project and configure it properly using Maven:
<project xmlns="" xmlns:xsi=""

Building the project with Maven is easy:
mvn package