On Mon, 21 May 2007, Mark T.B. Carroll wrote: > "Steffen Mazanek" <[EMAIL PROTECTED]> 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) ]
This would produce compiler warnings. What about: case compare m 0 of GT -> EQ -> LT -> ? _______________________________________________ Haskell-Cafe mailing list [email protected] http://www.haskell.org/mailman/listinfo/haskell-cafe
