def traverse base, arcs
    objs = [base]
    arcs.each_with_index do |arc,i|
      objs.map! { |obj| traverse_one obj, arc, i==0 }
      objs.flatten!
    end
    objs
  end
def traverse base, arcs
    objs = [base]
    arcs.each_with_index do |arc,i|
      objs.map! { |obj| traverse_one obj, arc, i==0 }
      objs.flatten!
    end
    objs
  end
Starting from base, traverse each path element in arcs. Since the path
 may contain wildcards, this function returns a list of matches.