Functions { public static <T> Function<List<T>, List<T>> withoutSeparators() { return list -> { List<T> result = new ArrayList<>(); for (int i = 0; i < list.size(); i += 2) { result.add(list.get(i)); } return result; }; } private  Functions(); static Function<List<T>, T> firstOfList(); static Function<List<T>, T> lastOfList(); static Function<List<T>, T> nthOfList(int index); static Function<List<T>, List<T>> permutationOfList(
      int... indexes); static Function<List<T>, List<T>> withoutSeparators(); static Function<Object, T> constant(T output);  }
@Test public void testWithoutSeparators() { assertEquals(EMPTY, withoutSeparators().apply(EMPTY)); assertEquals(ONE, withoutSeparators().apply(ONE)); assertEquals(ONE, withoutSeparators().apply(TWO)); assertEquals(asList('a', 'c'), withoutSeparators().apply(THREE)); }