def rotate(count = 1)
      raise Erlang::ImproperListError if improper?
      raise TypeError, "expected Integer" if not count.is_a?(Integer)
      return self if empty? || (count % size) == 0
      count = (count >= 0) ? count % size : (size - (~count % size) - 1)
      return drop(count).append(take(count))
    end
def rotate(count = 1)
      raise Erlang::ImproperListError if improper?
      raise TypeError, "expected Integer" if not count.is_a?(Integer)
      return self if empty? || (count % size) == 0
      count = (count >= 0) ? count % size : (size - (~count % size) - 1)
      return drop(count).append(take(count))
    end
Return a new `List` with the same elements, but rotated so that the one at
 index `count` is the first element of the new list. If `count` is positive,
 the elements will be shifted left, and those shifted past the lowest position
 will be moved to the end. If `count` is negative, the elements will be shifted
 right, and those shifted past the last position will be moved to the beginning.

 @example
   l = Erlang::List["A", "B", "C", "D", "E", "F"]
   l.rotate(2)   # => Erlang::List["C", "D", "E", "F", "A", "B"]
   l.rotate(-1)  # => Erlang::List["F", "A", "B", "C", "D", "E"]

 @param count [Integer] The number of positions to shift items by
 @return [List]
 @raise [TypeError] if count is not an integer.