<commit_before>class Stack
  Struct.new('Node', :data, :pre_min, :next)

  attr_reader :min

  def push(data)
    new_node = Struct::Node.new(data, nil, @head)
    @head = new_node

    if @min == nil
      @min = data
    else
      if data < @min
        new_node.pre_min = @min
        @min = data
      end
    end

    data
  end

  def pop
    return if empty?

    top = @head
    @head = top.next

    @min = nil if empty?
    @min = top.pre_min unless top.pre_min.nil?

    top.data
  end

  def peek
    @head.data
  end<commit_msg>Relabel :next to :prev in Stack struct<commit_after>class Stack
  Struct.new('Node', :data, :pre_min, :prev)

  attr_reader :min

  def push(data)
    new_node = Struct::Node.new(data, nil, @head)
    @head = new_node

    if @min == nil
      @min = data
    else
      if data < @min
        new_node.pre_min = @min
        @min = data
      end
    end

    data
  end

  def pop
    return if empty?

    top = @head
    @head = top.prev

    @min = nil if empty?
    @min = top.pre_min unless top.pre_min.nil?

    top.data
  end

  def peek
    @head.data
  end
{'fraction_non_alphanumeric': 0.10640216411181244, 'fraction_numerical': 0.0, 'mean_word_length': 1.928759894459103, 'pattern_counts': {'":': 0, '<': 5, '<?xml version=': 0, '>': 3, 'https://': 0, 'lorem ipsum': 0, 'www.': 0, 'xml': 0}, 'pii_count': 0, 'substrings_counts': 0, 'word_list_counts': {'cursed_substrings.json': 0, 'profanity_word_list.json': 0, 'sexual_word_list.json': 0, 'zh_pornsignals.json': 0}}
{'dir': 'git-commits-cleaned', 'id': '4461791', 'n_tokens_mistral': 422, 'n_tokens_neox': 401, 'n_words': 117}