madlisp/src/Vector.php
2020-05-31 11:34:24 +07:00

14 lines
263 B
PHP

<?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");
}
}