Re: [Haskell-cafe] Style and a problem

2010-09-10 Thread Wanas
I should've mentioned that the maximum number in such a list is n. That's why it stuck me as 'a bit' inexpensive. \/\/ On Fri, Sep 10, 2010 at 5:02 AM, Richard O'Keefe o...@cs.otago.ac.nz wrote: On Sep 10, 2010, at 8:55 AM, Wanas wrote: Hey all, So I have a two part question (I'm new

Re: [Haskell-cafe] Style and a problem

2010-09-10 Thread Wanas
On Fri, Sep 10, 2010 at 1:06 AM, Nils Schweinsberg m...@n-sch.de wrote: Something like this? import Data.List newList :: Int - [[Int]] newList n = myNub [ l | l - undefined -- not really sure how you want -- to generate these lists :)

Re: [Haskell-cafe] Style and a problem

2010-09-10 Thread Brent Yorgey
On Fri, Sep 10, 2010 at 12:24:39PM +0300, Wanas wrote: On Fri, Sep 10, 2010 at 1:06 AM, Nils Schweinsberg m...@n-sch.de wrote: Something like this? import Data.List newList :: Int - [[Int]] newList n = myNub [ l | l - undefined -- not really sure how you want

Re: [Haskell-cafe] Style and a problem

2010-09-09 Thread Nils Schweinsberg
Am 09.09.2010 22:55, schrieb Wanas: Hey all, So I have a two part question (I'm new to haskell, so you can throw all your mugs at me). a) I want to write a function that generates lists of lists of size $n$. All having the property that sum lst = sum [1..n]. a-1) After that, I want to remove

Re: [Haskell-cafe] Style and a problem

2010-09-09 Thread Daniel Fischer
On Thursday 09 September 2010 22:55:14, Wanas wrote: Hey all, So I have a two part question (I'm new to haskell, so you can throw all your mugs at me). a) I want to write a function that generates lists of lists of size $n$. All having the property that sum lst = sum [1..n]. a-1) After

Re: [Haskell-cafe] Style and a problem

2010-09-09 Thread Bulat Ziganshin
Hello Wanas, Friday, September 10, 2010, 12:55:14 AM, you wrote: a) I want to write a function that generates lists of lists of size $n$. All having the property that sum lst = sum [1..n]. a-1) After that, I want to remove all permutations. My idea of you have very interesting questions.

Re: [Haskell-cafe] Style and a problem

2010-09-09 Thread Wanas
Although it was phrased as one, it wasn't. If it were a homework question, wouldn't you think that I'd be trained to do it or have a TA to ask? But who said that you're accusing me of anything :) Thanks for your concern, Bulat. \/\/ On Fri, Sep 10, 2010 at 1:47 AM, Bulat Ziganshin

Re: [Haskell-cafe] Style and a problem

2010-09-09 Thread Richard O'Keefe
On Sep 10, 2010, at 8:55 AM, Wanas wrote: Hey all, So I have a two part question (I'm new to haskell, so you can throw all your mugs at me). a) I want to write a function that generates lists of lists of size $n$. All having the property that sum lst = sum [1..n]. a-1) After that, I