Suppose you want a function to find all subsequences of a list with a certain length. For instance, the subsequences of (1...5) with length 2 are as follows. (1 2) (1 3) (1 4) (1 5) (2 3) (2 4) (2 5) (3 4) (3 5) (4 5)This is not a red-herring example cooked up just to make Java look bad. This actually came up at work! I did something along these lines. Yuck. private static <T> List<List<T>> subn(i