Semi-Dynamic method calling

Run Settings
LanguageRaku
Language Version
Run Command
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)(" ")
Editor Settings
Theme
Key bindings
Full width
Lines