Re: [Haskell-cafe] cost of List.// for Ord types?

2004-09-07 Thread Henning Thielemann
On Fri, 3 Sep 2004, David Roundy wrote: Hello, I was wondering if the list diff operator \\ takes advantage of situations where the list data type is in class Ord, besides being in Eq. If it is only in Eq, then \\ must be O(n^2), while if it is in Ord, a O(nlogn) \\ can be written. Is

Re: [Haskell-cafe] cost of List.// for Ord types?

2004-09-07 Thread Fergus Henderson
On 03-Sep-2004, David Roundy [EMAIL PROTECTED] wrote: I was wondering if the list diff operator \\ takes advantage of situations where the list data type is in class Ord, besides being in Eq. No, it cannot, at least not in the general case. The interface for \\ says that it only depends on the