diff --git a/doc/Language/functions.pod6 b/doc/Language/functions.pod6 index 885a66a9e..8ebe3bc01 100644 --- a/doc/Language/functions.pod6 +++ b/doc/Language/functions.pod6 @@ -33,13 +33,13 @@ The sub declarator returns a value of type L that can be stored in any container: my &c = sub { say "Look ma, no name!" } - c; + c; # OUTPUT: «Look ma, no name!␤» - my Any:D $f = sub { say '$f' } - $f; + my Any:D $f = sub { say 'Still nameless...' } + $f(); # OUTPUT: «Still nameless...␤» my Code \a = sub { say ‚raw containers don't implement postcircumfix:<( )>‘ }; - a.(); + a.(); # OUTPUT: «raw containers don't implement postcircumfix:<( )>␤» The declarator C will declare a new name in the current scope at compile time. As such any indirection has to be resolved at compile time: