| ☞ | Program
Repair Shop ![]() |
37 |
$a1->add_observer($g1);
$a1->add_observer($g1);
I don't know what the "right" thing is here
Particularly in conjunction with deletions, etc.
So I'll just try to get it to be consistent:
Each unique observer is notified exactly once
This will come in handy:
sub _uniq {
my %seen;
return grep !$seen{$_}++, @_;
}
Now let's dive into the code.
| ☞ | ![]() |
☞ |