Ticket #3399 (closed proposal: wontfix)
Generalize the type of Data.List.{deleteBy, deleteFirstsBy}
| Reported by: | iago | Owned by: | |
|---|---|---|---|
| Priority: | normal | Milestone: | Not GHC |
| Component: | libraries/base | Version: | 6.10.4 |
| Keywords: | Cc: | ||
| Operating System: | Unknown/Multiple | Architecture: | Unknown/Multiple |
| Type of failure: | None/Unknown | Difficulty: | Unknown |
| Test Case: | Blocked By: | ||
| Blocking: | Related Tickets: |
Description
Better (more general) type signatures would be
deleteBy :: (b -> a -> Bool) -> b -> [a] -> [a] deleteFirstsBy :: (b -> a -> Bool) -> [b] -> [a] -> [a]
Example of why it is useful:
deleteBy ((==) . fst) 1 [(1,'a'), (2, 'b')]
Change History
Note: See
TracTickets for help on using
tickets.
