module Steep::AST::Types::Helper::ChildrenLevel
def level_of_children(children)
def level_of_children(children) levels = children.map(&:level) children.map(&:level).sort {|a, b| (b.size <=> a.size) || 0 }.inject() do |a, b| a.zip(b).map do |x, y| if x && y x + y else x || y || raise end end end || [] end