Re: Large lists, heaps, stacks...

2001-10-19 Thread Till Doerges
Hi everybody, thanks for all the answers! On Fri, Oct 19, 2001 at 09:55:00AM +0200, Janis Voigtlaender wrote: [...] > You might try the following version that does not build up huge data > structures in accumulating parameters to output them only in the two > base cases. Rather, it produces par

Re: Large lists, heaps, stacks...

2001-10-19 Thread Steinitz, Dominic J
Have you looked in the list library? partition or groupBy may be what you want. Dominic. - To receive our special fares directly by email, register at http://www.britishairways.com/registration

Re: Large lists, heaps, stacks...

2001-10-19 Thread Janis Voigtlaender
Till Doerges writes: > I tried to implement a function that separates a list into two parts > according to a list of indices given. (Does anything like that perhaps > exist already in the Prelude?) > ... > > 1) Could anybody please explain the behaviour of select and select' > to me? >

Re: Large lists, heaps, stacks...

2001-10-18 Thread Janis Voigtlaender
Till Doerges writes: > select' :: [a] -> [Integer] -> ([a],[a]) > select' xs poss = sAcc xs (sort poss) 0 ([],[]) > where sAcc :: [a] -> [Integer] -> Integer -> (([a],[a]) -> ([a],[a])) > ... > > Crash> select' "test" [0..] > > (35922 reductions, 63905 cells) > ERROR: Control stack overflow

Large lists, heaps, stacks...

2001-10-18 Thread Till Doerges
Hi everybody, I'm having to deal w/ rather long(*) lists. Unfortunately I stumbled across some problems in the process. I tried to implement a function that separates a list into two parts according to a list of indices given. (Does anything like that perhaps exist already in the Prelude?) ---