Invocable code object
Callables can be stored in
&-sigiled containers, the default type constraint of such a container is
my = ; # Empty block needs a semicolonmy = -> ;my = sub () ;sub foo() ;my = ;
method CALL-ME(Callable : |arguments)
This method is required for postfix:«( )» and postfix:«.( )». It's what makes an object actually call-able and needs to be overloaded to let a given object act like a routine. If the object needs to be stored in a
&-sigiled container, is has to implement Callable.
does Callablemy = A;say a(); # OUTPUT: «called␤»