protected function isSequence($value)
    {
        if (!Helper::isSequential($value)) {
            return false;
        }

        if ($value === []) {
            return true;
        }

        $i=0;

        $lastItemType = null;

        foreach ($value as $key=>$item) {

            if ($key !== $i) {
                return false;
            }

            $itemType = Type::of($item);

            // TODO: list could be typed by common class or interface
            if ($i !== 0 && $itemType != $lastItemType) {
                return false;
            }

            $lastItemType = $itemType;
            $i++;
        }

        return true;

    }