Sorting algorithms/Sleep sort: Difference between revisions
Content added Content deleted
(Add additional Go implementation using WaitGroups instead of channels) |
m (Use the new(-ish) raku binary in second Raku example) |
||
Line 1,582: | Line 1,582: | ||
This can also be written using reactive programming: |
This can also be written using reactive programming: |
||
<lang perl6>#!/usr/bin/env |
<lang perl6>#!/usr/bin/env raku |
||
use v6; |
use v6; |
||
react whenever Supply.from-list(@*ARGS).start({ .&sleep // +$_ }).flat { .say }</lang> |
react whenever Supply.from-list(@*ARGS).start({ .&sleep // +$_ }).flat { .say }</lang> |