j
k
j a
j l
Why so long-winded :-)? combs = mapM (enumFromTo 0) mike Lyle Kopnicky writes: ...
Here is the improved version: combs [] = [[]] combs (n:r) = [i:cr | i <- [0..n], cr <- combs r] ...
Here is the improved version:
combs [] = [[]] combs (n:r) = [i:cr | i <- [0..n], cr <- combs r] ...
Back to the thread
Back to the list