TSa Thomas.Sandlass-at-barco.com |Perl 6| wrote:

   sub foo ($x) {...}

   $x = &foo.new(3);
I don't understand your point. Are you thinking of .callwith or postcircumfix<( )> methods on the Code object?

No, I think of foo not as a Code object but as a class that
does Code. Invoking foo means instanciating the Code class.
That is the above stores an uninvoked invocation of foo in $x.
Obviously you can invoke it as $x() later to get out what
foo(3) would. I think you can continue this with



No, &foo is an =instance= of class Routine (or something further derived from it), and Routine does Code.


Your example of making an uninvoked call is contradicted by the Synopses. It is explained under "currying".

--John

Reply via email to