CARVIEW |
Select Language
HTTP/2 200
date: Sat, 11 Oct 2025 22:01:48 GMT
content-type: text/html; charset=UTF-8
server: cloudflare
x-frame-options: DENY
x-content-type-options: nosniff
x-xss-protection: 1;mode=block
vary: accept-encoding
cf-cache-status: DYNAMIC
content-encoding: gzip
set-cookie: _csrf-frontend=1abf107050f128f5e1aac46547f9290df3d5bda8816e56cda6e2de74d50ec4c4a%3A2%3A%7Bi%3A0%3Bs%3A14%3A%22_csrf-frontend%22%3Bi%3A1%3Bs%3A32%3A%22KJT-du1IxrfbyMzq69n4SS3C2CcM8Gry%22%3B%7D; HttpOnly; Path=/
cf-ray: 98d1a35e6ee3ea32-BLR
Quick, reliable pseudo-shuffler (enhanced) - Pastebin.com
SHARE
TWEET

Quick, reliable pseudo-shuffler (enhanced)
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import Data.Function
- import Data.List
- orderLists :: [a] -> [a] -> ([a], [a])
- orderLists xs ys
- | on compare length xs ys == LT = (xs, ys)
- | otherwise = (ys, xs)
- listsLengthQuotient :: ([a], [a]) -> ([a], [a], Int)
- listsLengthQuotient (xs, ys) =
- (xs, ys, (round $ on (/) (fromIntegral . length) ys xs) :: Int)
- chunksOf :: Int -> [a] -> [[a]]
- chunksOf n [] = []
- chunksOf x xs = take x xs : chunksOf x (drop x xs)
- groupListItems :: ([a], [a], Int) -> ([[a]], [[a]])
- groupListItems (xs, ys, q) = (chunksOf 1 xs, chunksOf q ys)
- merge :: ([a], [a]) -> [a]
- merge (xs, []) = xs
- merge ([], ys) = ys
- merge (x:xs, y:ys) = y : x : merge (xs, ys)
- mixLists :: [a] -> [a] -> [a]
- mixLists xs ys =
- concat $ merge $ groupListItems $ listsLengthQuotient $ orderLists xs ys
- main :: IO ()
- main = do
- input <- getContents
- mapM_ putStrLn $
- foldl1 mixLists $ sortBy (on compare length) (group . sort $ lines input)
Advertisement
Add Comment
Please, Sign In to add comment
-
⭐ Free Crypto Method ⭐
JavaScript | 5 sec ago | 0.24 KB
-
⭐⭐⭐Make $1500 in 20 minutes⭐⭐
Java | 7 sec ago | 0.10 KB
-
📝 Crypto Swap Glitch ✅ Working
JavaScript | 14 sec ago | 0.24 KB
-
⭐⭐⭐Swapzone.io Glitch (Working)⭐⭐
Java | 20 sec ago | 0.10 KB
-
📝 EASY MONEY GUIDE ✅ Working
JavaScript | 23 sec ago | 0.24 KB
-
⭐⭐⭐Crypto Accounts⭐⭐
Java | 32 sec ago | 0.10 KB
-
📌 ChangeNOW Exploit
JavaScript | 33 sec ago | 0.24 KB
-
⭐⭐⭐MAKE $900 INSTANTLY⭐⭐
Java | 44 sec ago | 0.10 KB
We use cookies for various purposes including analytics. By continuing to use Pastebin, you agree to our use of cookies as described in the Cookies Policy. OK, I Understand