Philippe (>):
> I like solution 2, but am going to have to delve into the Perl 6 
> Documentation to
> understand its esoteric syntax:

S12 will be a big help here. You may have found it already.

 <http://perlcabal.org/syn/S12.html>

I include a few quick pointers below, which also may help.

> - class Tree { ... }

Perl 6 doesn't like types it hasn't seen yet. Because Tree::Branch
uses Tree, I need to declare Tree before I define it. The dots '...'
say "implementation forthcoming, but there's a type called 'Tree'".

> - handles <left right>;,

It's delegation. Instead of writing 'method left { $.branch.left }' in
that class, I just say that $.branch handles calls to 'left'.

> - self.bless(*,, etc.)

Any 'self.bless' you see means "create a new instance of this class,
with these attributes set".

// Carl

Reply via email to