Sorting algorithms/Sleep sort: Difference between revisions

no edit summary
No edit summary
Line 555:
end while
end if</lang>
 
=={{header|F#}}==
<lang fsharp>
let sleepSort (values: seq<int>) =
values
|> Seq.map (fun x -> async {
do! Async.Sleep x
Console.WriteLine x
})
|> Async.Parallel
|> Async.Ignore
|> Async.RunSynchronously
</lang>
 
Usage:
<lang fsharp>
sleepSort [10; 33; 80; 32]
10
32
33
80
</lang>
 
=={{header|Factor}}==
Anonymous user