What does this list permutations implementation in Haskell exactly do?
Sorry about the late answer, it took a bit longer to write down than expected. So, first of all to maximize lazyness in a list function like this there are two goals: Produce as many answers as possible before inspecting the next element of the input list The answers themselves must be lazy, and so … Read more