Projecting a list of lists efficiently in F#
First of all, try to avoid list concatenation (@) whenever possible, since it’s O(N) instead of O(1) prepend. I’d start with a (relatively) easy to follow plan of how to compute the cartesian outer product of lists. Prepend each element of the first list to each sublist in the cartesian product of the remaining lists. … Read more