I'm looking for a combinatoric function that's similar to 'combinations', except whereas combinations(1:3, 2) = [1,2], [1,3], [2,3], I want somefunction(1:3, 2) = [1, 2], [2,1], [1, 1], [1,3], [2,3], [3,1], [3,2], [2, 2], [3, 3] ie enumerate all possible length-2 arrays such that both elements are in the given iterable.
It wasn't clear to me there's something in Base that does this.
