my $m = "split";
my $s = "banana mango apple";
sub get-method(\value, Str $method) {
#my %methods = gather {
# take Pair.new(.gist, $_) if .^name ~~ "Method" for value.^methods;
#}.Hash;
#return -> *@args {%methods{$method}(value, |@args)}
# Compressed version of the code above:
return -> *@args {(gather {take Pair.new(.gist, $_) if .^name ~~ "Method" for value.^methods}.Hash){$method}(value, |@args)}
}
say $s.&get-method($m)(" ")