Re: reduce metaoperator on an empty list

2005-05-19 Thread C. Scott Ananian
On Wed, 18 May 2005, Rob Kinyon wrote: On 5/18/05, Stuart Cook <[EMAIL PROTECTED]> wrote: To summarise what I think everyone is saying, []-reducing an empty list yields either: 1) undef (which may or may not contain an exception), or 2) some unit/identity value that is a trait of the operator, depe

Re: How do I... invoke a method reference

2005-05-19 Thread C. Scott Ananian
On Thu, 19 May 2005, Juerd wrote: Ingo Blechschmidt skribis 2005-05-19 22:45 (+0200): class Foo { method bar() { 42 } method baz() { &bar } } my $ref = Foo.baz; My guess: Foo.$ref $object.$ref Just like in Perl 5. I think Ingo was trying to explicitly specify the normally-implic

Re: lazy context

2005-05-20 Thread C. Scott Ananian
On Fri, 20 May 2005, Yuval Kogman wrote: then it is not finalized into a real value. Here's how the range operator would be implemented: sub &infix:<..> ($from, $to where { $to < $from }){ reverse $to .. $from } sub &infix:<..> ($from, $to) { lazy gather { while ($f