Posts:
1
From:
Regensburg
Registered:
5/27/04
|
|
|
|
erratum p.340
Posted:
May 28, 2004 9:34 AM
|
|
In the recursive call of the pop() method, $self doesn't have to be passed, since it isn't touched in the callee:
return $self->{left}->pop($self) if defined $self->{left};
That would wind up in $_[1]. That doesn't hurt, of course, but I think it adds confusion in an already hard to grok example. So I suggest:
return $self->{left}->pop if defined $self->{left};
|
|
|
Legend
|
|
Gold: 300
+
pts
|
|
Silver: 100
- 299
pts
|
|
Bronze: 25
- 99
pts
|
|
Manning Author
|
|
Manning Staff
|
|