public static <T> List<T> duplicate(List<T> list) {
        return list.stream().flatMap(e -> Stream.of(e, e)).collect(toList());
    }
(*) Duplicate the elements of a list
<pre>
         duplicate(Arrays.asList("a", "b", "c", "d"))
</pre>
java8/src/main/java/com/shekhargulati/ninetynine_problems/_01_lists/P14.java