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

15 lines
261 B
PHP

<?php
namespace MadLisp;
class MList extends Seq
{
public function get(int $index)
{
if ($this->has($index)) {
return $this->data[$index];
}
throw new MadLispException("list does not contain index $index");
}
}