To my proposal to add to Haskell-2 library
delBy :: (a -> Bool) -> [a] -> [a]
Keith Wansbrough <[EMAIL PROTECTED]>
writes on 06 Dec 1999
> 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''."
Does this really imply that having delBy, the library has
necessarily to include `del' ?
Anyway, let us try to improve the proposal:
-------------------------------------------------------------------
(1) To change in the `List' library the deleteBy definition to
deleteBy :: (a -> Bool) -> [a] -> [a]
deleteBy _ [] = []
deleteBy p (a:as) = if p a then as else a:(deleteBy p as)
deleteBy of Haskell-98 to rename to
delByR2e (delete by binary relation (a->a->Bool) and element a).
- or better to remove it at all. For its type looks esoteric.
I wonder, who ever uses it.
(2) To change in the Section 7.6 of the Library Report
"
By convention, overloaded functions have a non-overloaded
counterpart whose name is suffixed with ``By''.
"
to
"
By convention, an overloaded function may have several
non-overloaded counterparts whose names are suffixed with
`By'[ss].
Examples: By means "by something simplest",
ByP by predicate,
ByR2 by binary relation,
...
"
---------------------------------------------------------------------
------------------
Sergey Mechveliani
[EMAIL PROTECTED]