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
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
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?
>
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
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?)
---