mirror of
https://github.com/idris-lang/Idris2.git
synced 2024-12-19 09:12:34 +03:00
10 lines
290 B
Idris
10 lines
290 B
Idris
|
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 "")
|