Created
April 21, 2014 20:09
-
-
Save timo/11154880 to your computer and use it in GitHub Desktop.
simple example for supplies with intervals.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
perl6-m -e 'Supply.merge(Supply.interval(2).map({ "tick" }), Supply.interval(2, 1).map({ "tock" })).tap(&say); sleep 10;' | |
tick | |
tock | |
tick | |
tock | |
tick | |
tock | |
tick | |
tock | |
tick | |
tock | |
tick | |
perl6-m -e 4,58s user 5,65s system 99% cpu 10,258 total |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment