     find_arc: (val) ->
       for arc in @_arcs
         return arc if arc.test(val)
-
-    intersect: (other) ->
-      # warning: Cartesian product
-      arc for arc in @arcs() when other.find_arc(arc.value)
 
   class @Arc
     constructor: (@vertex, @id, @value, @next_vertex) ->


    product_vertex: (v1, v2) ->
      key = @vkey(v1, v2)
      @product_vertices[key]

    product_next: (v1, v2) ->
      unless (result = @product_vertex(v1, v2))
        result = @intersection.create_vertex()
        @add_unvisited(v1, v2, result)
      result

    add_unvisited: (v1, v2, product_vertex) ->
      key = @vkey(v1, v2)

        delete @unvisited[key]
        [v1, v2, @product_vertices[key]]

    # this only works if arc equivalence is assumed to mean
    # that the arcs have the same @value
    intersecting_arcs: (v1, v2, callback) ->
      vals = {}
      for arc in v1.arcs()
        vals[arc.value] = arc
      for other_arc in v2.arcs()
        if (this_arc = vals[other_arc.value])
          callback(this_arc, other_arc)



  # return a new digraph that is the intersection of the two graphs.  
  # NOTE: FSM subclasses will end up with sinks that aren't final.
  intersect: (other) ->
    digraph = @
    product = new @constructor()
