The latter, using the comprehension, is a bit better in GHC,
because if c' gets inlined the list comprehension might get
deforested with its consumer. WIth an explicitly recursive c, that
won't happen.
Simon
> -Original Message-
> From: [EMAIL PROTECTED] [mailto:[EMAIL PROTECTED]]
> Sent: Monday, October 04, 1999 5:40 PM
> To: [EMAIL PROTECTED]
> Subject: ++ vs comprehension
>
>
> Which is better, c [] = []
>c (xs:xss) = xs++(c xss)
> or
>c' xss = [x | xs <- xss, x <- xs]
> ?
> Which is likely to run more efficiently when composed with other
> functions?
>
> Thank you in advance for your explanations.
>
>
> --
> Sergey Mechveliani
> [EMAIL PROTECTED]
>
>
>
>
>
>
>