removed unneeded Ord

This commit is contained in:
Thorn Avery 2020-12-06 20:44:58 +13:00
parent f48f0459ac
commit c8eb59c10f

View File

@ -1,4 +1,4 @@
import Data.List (nub, sort)
import Data.List (nub)
main :: IO ()
main = do
@ -11,8 +11,8 @@ main = do
putStrLn $ "day6a: " ++ (show ansA)
putStrLn $ "day6b: " ++ (show ansB)
match :: (Ord a, Eq a) => [a] -> [a] -> [a]
match as bs = (sort . nub) $ filter (`elem` bs) as
match :: Ord a => [a] -> [a] -> [a]
match as bs = nub $ filter (`elem` bs) as
split :: Eq a => a -> [a] -> [[a]]
split _ [] = []