chg: Only import the required functions

This commit is contained in:
Sayantan Santra 2024-05-26 00:36:26 -05:00
parent a45b84ee9c
commit 01eeffd2a4
Signed by: SinTan1729
GPG key ID: EB3E68BFBA25C85F
5 changed files with 8 additions and 8 deletions

View file

@ -1,5 +1,5 @@
import Data.List import Data.List (nub)
import System.Random import System.Random (getStdGen, randomRs)
rndSelect :: [a] -> Int -> IO [a] rndSelect :: [a] -> Int -> IO [a]
rndSelect ls n = do rndSelect ls n = do

View file

@ -1,5 +1,5 @@
import Data.List import Data.List (nub)
import System.Random import System.Random (getStdGen, randomRs)
diffSelect :: Int -> Int -> IO [Int] diffSelect :: Int -> Int -> IO [Int]
diffSelect n m = do diffSelect n m = do

View file

@ -1,5 +1,5 @@
import Data.List import Data.List (nub)
import System.Random import System.Random (getStdGen, randomRs)
rndPermu :: [a] -> IO [a] rndPermu :: [a] -> IO [a]
rndPermu ls = do rndPermu ls = do

View file

@ -1,4 +1,4 @@
import Data.List import Data.List (groupBy, nub, permutations, sortBy)
group' :: [Int] -> [a] -> [[[a]]] group' :: [Int] -> [a] -> [[[a]]]
group' ln ls = map ((([([fst] <*>)] <*>) . groupBy grouper . sortBy sorter) . zip ls) (nub (permutations placers)) group' ln ls = map ((([([fst] <*>)] <*>) . groupBy grouper . sortBy sorter) . zip ls) (nub (permutations placers))

View file

@ -1,4 +1,4 @@
import Data.List import Data.List (sortBy)
lsort :: [[a]] -> [[a]] lsort :: [[a]] -> [[a]]
lsort = sortBy (\x y -> length x `compare` length y) lsort = sortBy (\x y -> length x `compare` length y)