Re: Data.List permutations

2009-08-05 Thread Slavomir Kaslev
Thank you for the comprehensive reply Yitzchak. On Wed, Aug 5, 2009 at 2:22 PM, Yitzchak Gale wrote: > Hi Slavomir, > > Slavomir Kaslev wrote: >>> inter x [] = [[x]] >>> inter x yys@(y:ys) = [x:yys] ++ map (y:) (inter x ys) >> >>> perm [] = [[]] >

Re: Data.List permutations

2009-08-04 Thread Slavomir Kaslev
On Tue, Aug 4, 2009 at 9:23 PM, Daniel Fischer wrote: > Am Dienstag 04 August 2009 19:48:25 schrieb Slavomir Kaslev: >> A friend mine, new to functional programming, was entertaining himself by >> writing different combinatorial algorithms in Haskell. He asked me for some >>

Re: Data.List permutations

2009-08-04 Thread Slavomir Kaslev
perm2 xs)) I've just noticed that permutations and perm enumerate the permutations in different order. > On 8/4/09, Slavomir Kaslev wrote: >> A friend mine, new to functional programming, was entertaining himself by >> writing different combinatorial algorithms in Haskell. He a

Data.List permutations

2009-08-04 Thread Slavomir Kaslev
uggest to change the current implementation in Data.List with the simpler one. Also, it would be nice to add variations and combinations in the Data.List module. Cheers. -- Slavomir Kaslev ___ Glasgow-haskell-users mailing list Glasgow-haskell-users@haskell.org http://www.haskell.org/mailman/listinfo/glasgow-haskell-users