
23 Jun
2008
23 Jun
'08
5:42 a.m.
2008/6/23 leledumbo
I give up %-|, I'll go back to Pascal instead. Thanks for your answers.
Don't give up so fast !! (Note that you can't do what you asked for in Pascal either, in fact Pascal don't support n-uplet) A recursive way to do it is : findAllAns 0 0 = [[]] findAllAns 0 s = [] findAllAns n s = [ x:xs | x <- [0..s], xs <- findAllAns (n - 1) (s - x) ] For all those little questions that bug you, you'll get your answers faster by asking on the #haskell channel on irc.freenode.org . -- Jedaï