Mon Dec 06 1999, Keith Wansbrough ->
> Sergey:
> > I propose for  Haskell-2  to add to the library
> > 
> >   delBy :: (a -> Bool) -> [a] -> [a]
> >   delBy _ []     = []
> >   delBy p (a:as) = if  p a  then  as  else  a:(delBy p as) 
> 
> So what do you propose as the definition for
> 
> del :: (Eq a) => [a] -> [a]
> 
> ?
> 
> Section 7.6 of the Library Report:
> 
> "By convention, overloaded functions have a non-overloaded counterpart
> whose name is suffixed with ``By''."

I have two suggestions:

del1 = const []
del2 = id

but since these are so easy to write anyway, they don't belong in the
prelude.

        Martin

-- 
[ http://www.dtek.chalmers.se/~d95mback/ ] [ PGP: 0x453504F1 ] [ UIN: 4439498 ]
    Opinions expressed above are mine, and not those of my future employees.
                  Skingra er! Det finns ingenting att förstå!

PGP signature

Reply via email to