madlisp/src/Vector.php

14 lines
263 B
PHP
Raw Normal View History

2020-05-31 04:34:24 +00:00
<?php
namespace MadLisp;
class Vector extends Seq
{
public function get(int $index)
{
if ($this->has($index)) {
return $this->data[$index];
}
throw new MadLispException("vector does not contain index $index");
}
}