import java.util.*;
import java.util.function.*;
import java.util.stream.*;

class Ideone {
        public static final Function<List<IntUnaryOperator>, UnaryOperator<List<Integer>>> mapper
            = opList -> argList -> argList.stream()
                .flatMap(i -> opList.stream()
                    .collect(Collector.of(
                    	ArrayList<IntUnaryOperator>::new,
                    	(a, b) -> a.add(a.isEmpty() ? b : a.get(a.size() - 1).andThen(b)),
                    	(a, b) -> { throw new UnsupportedOperationException(); }
                    ))
                    .stream()
                    	.map(op -> op.applyAsInt(i))
                )
                .collect(Collectors.toList());

    public static void main(String[] args) {
        List<Integer> list = mapper.apply(List.of(x -> x, x -> x + 1, x -> x * x)).apply(List.of(1, 2));
        System.out.println(list);
    }
}