Advertisement
Not a member of Pastebin yet?
Sign Up,
it unlocks many cool features!
- import qualified Data.ByteString.Lazy as L
- import qualified Data.ByteString.Char8 as C
- chars = ['A'..'Z'] ++ ['0'..'9']
- colSizes :: [Int]
- colSizes = [4, 4, 4, 3, 5, 1, 1, 3, 3, 3, 3, 3, 3, 10, 3, 1, 1, 1, 2, 3, 10]
- buildRow = [replicate (colSizes !! x) (chars !! x) | x <- [0.. length colSizes - 1]]
- chunkSize :: Int
- chunkSize = 10000 -- lines
- nl = C.singleton '\n'
- rawBytes = C.intercalate nl . replicate chunkSize . C.pack . concat $ buildRow
- lazyGenerator = L.cycle (L.fromStrict rawBytes)
- main = L.putStr lazyGenerator
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement