syntax supply emit

Documentation for syntax supply emit assembled from the following types:

language documentation Control flow

From Control flow

(Control flow) control flow supply emit supply emit

Emits the invocant into the enclosing supply:

my $supply = supply {
    emit $_ for "foo"42.5;
}
$supply.tap: {
    say "received {.^name} ($_)";
}
 
# OUTPUT: 
# received Str (foo) 
# received Int (42) 
# received Rat (0.5)