Skip to content

Instantly share code, notes, and snippets.

@niner
Created August 20, 2021 10:51
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save niner/e21d3268d479365622d8d985b2bce7e2 to your computer and use it in GitHub Desktop.
Save niner/e21d3268d479365622d8d985b2bce7e2 to your computer and use it in GitHub Desktop.
my $supplier = Supplier.new;
my $sinker = supply {
whenever $supplier.Supply -> $connection {
my $transformer = supply {
whenever Supply.interval(1) { }
whenever $connection {
emit 0;
}
}
whenever $transformer -> $response { }
}
};
my $service-tap = $sinker.tap: quit => { .note };
loop {
$supplier.emit: 1;
}
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment