class RuboCop::AST::NodePattern::Node::Subsequence

A list (potentially empty) of nodes; part of a Union

def arity

def arity
  min, max = children.map { |child| child.arity_range.minmax }.transpose.map(&:sum)
  min == max ? min || 0 : min..max # NOTE: || 0 for empty case, where min == max == nil.
end

def in_sequence_head

def in_sequence_head
  super if children.empty?
  return unless (replace = children.first.in_sequence_head)
  [with(children: [*replace, *children[1..]])]
end