Flwyd Is there a syntax for getting a method reference as a callable? In the same way that $x.map(&foo) passes subroutine foo to map, I'd like to pass a bound method, e.g. $x.map(&$y.bar). 05:14
(The only thing I've found which works is invoking the method in a block: $x.map({ $y.bar($^a) }). This works, but it seems like Raku would have a way to treat a method as a first-class object. 05:16
CIAvash Flwyd: you can do it with `^find_method`. `Y.^find_method('bar')`. And if `$x` doesn't contain objects of type `Y`, then you need to pass the object to the method: `Y.^find_method('bar').assuming: $y`. I don't think there is any other way, because the first parameter of a method is the invocant. 06:19
Flwyd Interesting, thanks. `<foo bar baz>.map: Str.^find_method('uc')` for a concrete example. 06:26
Nemokosch btw uc exists as a sub as well 10:06
So you wouldn't have to do this in this concrete case
CIAvash If they wanted to just call a method, then they could just write `<foo bar baz>.map: *.method_name`. Their original question suggested something else. 13:53