Hi,
Am Mittwoch, den 18.10.2017, 13:49 -0400 schrieb David Feuer:
> I am convinced that we should add
>
> ordNub :: Ord a => [a] -> [a]
> ordNubOn :: Ord b => (a -> b) -> [a] -> [b]
> intNub :: [Int] -> [Int]
> intNubOn :: (a -> Int) -> [a] -> [a]
can we shed the names a bit? I think the operation “nubbing” should be
first, and the details (”…On”, “…By”, “…OrdOn”, “Ord”, “Int”) should be
the second component. This would also have the advantage of listing all
”nub” variants together in an index.
So:
nubOrd :: Ord a => [a] -> [a]
nubOrdOn :: Ord b => (a -> b) -> [a] -> [b]
nubInt :: [Int] -> [Int]
nubIntOn :: (a -> Int) -> [a] -> [a]
This is consistent with, say “map” vs. “mapM” and other suffix-based
naming in the libraries.
Greetings,
Joachim
--
Joachim Breitner
mail@joachim-breitner.de
http://www.joachim-breitner.de/
_______________________________________________
Libraries mailing list
Libraries@haskell.org
http://mail.haskell.org/cgi-bin/mailman/listinfo/libraries