def insert(index, *items)
      raise Erlang::ImproperListError if improper?
      if index == 0
        return Erlang::List.from_enum(items).append(self)
      elsif index > 0
        out = tail = Erlang::Cons.allocate
        list = self
        while index > 0
          new_node = Erlang::Cons.allocate
          new_node.instance_variable_set(:@head, list.head)
          new_node.instance_variable_set(:@improper, false)
          tail.instance_variable_set(:@tail, new_node)
          tail.instance_variable_set(:@improper, false)
          tail.immutable!
          tail = new_node
          list = list.tail
          index -= 1
        end
        if not tail.immutable?
          tail.instance_variable_set(:@tail, Erlang::List.from_enum(items).append(list))
          tail.immutable!
        end
        return out.tail
      else
        raise IndexError if index < -size
        return insert(index + size, *items)
      end
    end
def insert(index, *items)
      raise Erlang::ImproperListError if improper?
      if index == 0
        return Erlang::List.from_enum(items).append(self)
      elsif index > 0
        out = tail = Erlang::Cons.allocate
        list = self
        while index > 0
          new_node = Erlang::Cons.allocate
          new_node.instance_variable_set(:@head, list.head)
          new_node.instance_variable_set(:@improper, false)
          tail.instance_variable_set(:@tail, new_node)
          tail.instance_variable_set(:@improper, false)
          tail.immutable!
          tail = new_node
          list = list.tail
          index -= 1
        end
        if not tail.immutable?
          tail.instance_variable_set(:@tail, Erlang::List.from_enum(items).append(list))
          tail.immutable!
        end
        return out.tail
      else
        raise IndexError if index < -size
        return insert(index + size, *items)
      end
    end
Return a new `List` with the given items inserted before the item at `index`.

 @example
   Erlang::List["A", "D", "E"].insert(1, "B", "C") # => Erlang::List["A", "B", "C", "D", "E"]

 @param index [Integer] The index where the new items should go
 @param items [Array] The items to add
 @return [List]