[Haskell-cafe] Help with generalizing function
Bulat Ziganshin
bulat.ziganshin at gmail.com
Mon Jun 23 05:45:30 EDT 2008
Hello Chaddai,
Monday, June 23, 2008, 1:42:25 PM, you wrote:
>> I give up %-|, I'll go back to Pascal instead. Thanks for your answers.
> findAllAns 0 0 = [[]]
> findAllAns 0 s = []
> findAllAns n s = [ x:xs | x <- [0..s], xs <- findAllAns (n - 1) (s - x) ]
seems that leledumbo found a new way to force us give the answers to
those homeworks LOL
--
Best regards,
Bulat mailto:Bulat.Ziganshin at gmail.com
More information about the Haskell-Cafe
mailing list