Closed tusooa closed 8 years ago
sub new { my ($class, $parent) = @_; my $self = { parent => $parent, var => {}, }; bless $self, $class; } sub find { my ($self, $name) = @_; if (defined $self->{var}->{$name}) { return $self->{var}->{$name}; } elsif ($self->{parent}) { return $self->{parent}->find ($name); } else { return $nil; } }
另。吾是想用perl写的。
呃,我发现我已经看不太懂Perl的代码了,囧……
四年前的自己写了什么?0 0 不过perl的lisp啊 cpan上有好多模块了x