### array class

sub new {
    my $class = shift;

    my $self = { base => (), length => 0, index => 0, };

    bless $self, $class;

}

sub indexOf {
    my ($self, $index) = @_;

    return $self->{base}[$index] if $self->length > $index;
}

sub add {
    my ($self, $value) = @_;

    $self->{length}++;
    push ($self->{base}, $value);

}

sub len {
    return $self->{length};
}

sub index {
    return $self->{index};
}

1;
