j
k
j a
j l
"Steffen Mazanek" writes:
alg 5 1 = [[1]] alg 5 2 = [[1,1],[2]] alg 5 3 = [[1,1,1],[1,2],[2,1],[3]]
Would this be better? alg n m = case signum m of -1 -> [] 0 -> [[]] 1 -> [ x : xs | x <- [1..n], xs <- alg n (m - x) ] -- Mark
Back to the thread
Back to the list