def prepend(*items, max: nil, exists: false)
      max = max.to_i

      # redis literally prepends each element one at a time, so 1 2 will end up 2 1
      # to keep behaviour in sync with Array#unshift we preemptively reverse the list
      items = items.reverse

      results = if max.positive? || exists
        push_and_trim_script(keys: @key, argv: [max - 1, true, exists] + items)
      else
        self.connection.lpush(@key, items)
      end

      return results
    end
def prepend(*items, max: nil, exists: false)
      max = max.to_i

      # redis literally prepends each element one at a time, so 1 2 will end up 2 1
      # to keep behaviour in sync with Array#unshift we preemptively reverse the list
      items = items.reverse

      results = if max.positive? || exists
        push_and_trim_script(keys: @key, argv: [max - 1, true, exists] + items)
      else
        self.connection.lpush(@key, items)
      end

      return results
    end
Prepends the given items (from the right) to the list
 @param [Array<#to_s>] items the items to prepend
 @param [Integer] max optional; if given, prepends the items and trims down the list to max afterwards
 @param [Boolean] exists optional; if true, only prepends iff the list already exists (i.e. is not empty)
 @return [Integer] the number of items prepended to the list