Data update
This commit is contained in:
parent
4bb20c9b71
commit
cbaf4c4b64
12390 changed files with 318560 additions and 27248 deletions
10
Task/Time-a-function/ArkScript/time-a-function.ark
Normal file
10
Task/Time-a-function/ArkScript/time-a-function.ark
Normal file
|
|
@ -0,0 +1,10 @@
|
|||
(import std.Sys)
|
||||
|
||||
(let work (fun (x) (sys:sleep (random x (* 2 x)))))
|
||||
|
||||
(let timer (fun (f) {
|
||||
(let start (time))
|
||||
(f)
|
||||
(- (time) start) }))
|
||||
|
||||
(print (timer (fun () (work 50))))
|
||||
Loading…
Add table
Add a link
Reference in a new issue