I have a piece of asyncronous code I would like to run at a later date. I figured a Promise would suit this purpose fine.
So far this is what I have:
sub makePromise ( $o, $m, :$in = 0, :$args = @() ) {
my $p = Promise.new;
for $args {
.wrap({
nextsame;
$p.keep;
}) if Callable;
}
$o."$m"( |$args );
$p;
}
Am I missing anything....