diff --git a/src/Collection.php b/src/Collection.php index 0a59b4c..72116b5 100644 --- a/src/Collection.php +++ b/src/Collection.php @@ -3,6 +3,12 @@ namespace MadLisp; abstract class Collection { + public static function new(array $data = []): self + { + // late static binding + return new static($data); + } + protected array $data = []; public function __construct(array $data = []) diff --git a/src/Seq.php b/src/Seq.php index 1b4ee41..bc04873 100644 --- a/src/Seq.php +++ b/src/Seq.php @@ -3,9 +3,5 @@ namespace MadLisp; abstract class Seq extends Collection { - public static function new(array $data = []): self - { - // late static binding - return new static($data); - } + }