Idris2/tests/node/fastConcat/FastConcat.idr

10 lines
290 B
Idris
Raw Normal View History

2021-10-14 15:34:41 +03:00
replicateTR : Nat -> a -> List a
replicateTR n v = go n Nil
where go : Nat -> List a -> List a
go 0 as = as
go (S k) as = go k (v :: as)
main : IO ()
main = printLn (length $ fastPack $ replicateTR 1000000 '0')
>> putStrLn (fastConcat $ replicateTR 1000000 "")