madlisp/src/MList.php

15 lines
261 B
PHP
Raw Normal View History

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