As explained in the docs, you can reference an existing function by prepending the & sigil:
&say # reference to the `say` function
&infix:<+> # reference to the infix `+` operator
How do I do this for methods?
As explained in the docs, you can reference an existing function by prepending the & sigil:
&say # reference to the `say` function
&infix:<+> # reference to the infix `+` operator
How do I do this for methods?
This article's author explains there are a few possibilities to get hold of a method object, however the most relevant one here is to use the MOP method
.^lookup:For example to get all the candidates's signatures for
Array'spushmethod you'd do: