void (Consumer<TreePath[]> consumer, IntFunction<Object> function, int min, int max) { List<TreePath> list = new ArrayList<>(); addPaths(function, min, max, list, null); System.err.println(); System.err.println(list.size() + " paths with count from " + min + " to " + max); System.err.println("1. ordered list:"); consumer.accept(TreePathUtil.toTreePathArray(list)); Collections.reverse(list); System.err.println("2. reversed list:"); consumer.accept(TreePathUtil.toTreePathArray(list)); Collections.shuffle(list); System.err.println("3. shuffled list:"); consumer.accept(TreePathUtil.toTreePathArray(list)); }