chg: Only import the required functions
This commit is contained in:
parent
a45b84ee9c
commit
01eeffd2a4
5 changed files with 8 additions and 8 deletions
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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
|
||||||
|
|
|
@ -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))
|
||||||
|
|
|
@ -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)
|
||||||
|
|
Loading…
Reference in a new issue