       if not equal @third(a, b), c
         this
       else
-        triangles = @triangles__.minus tri a, b, c
-        third = @third__.minusAll seq [[a, b], [b, c], [c, a]]
-        new Triangulation triangles, third
+        new Triangulation @third__.minusAll [[a, b], [b, c], [c, a]]
 
   # Here we define our access point. The function `triangulation` takes a list
   # of triangles, each given as an array of three abstract vertices.

  # The hidden class `Triangulation` implements our data structure.
  class Triangulation

    # The constructor takes a set of triangles and a map specifying the
    # associated third triangle vertex for any oriented edge that is part of
    # an oriented triangle.
    constructor: (args...) ->
      @triangles__ = args[0] or new HashSet()
      @third__     = args[1] or new HashMap()

    # The method `toSeq` returns the triangles contained in the triangulation
    # as a lazy sequence.
    memo @, 'toSeq', -> @triangles__.toSeq()

    # The method `third` finds the unique third vertex forming a triangle with
    # the two given ones in the given orientation, if any.

        trace -> "  Error in plus [#{@toSeq()?.join ', '}], (#{a}, #{b}, #{c})"
        throw new Error "Orientation mismatch."
      else
        new Triangulation @third__.plusAll [[[a,b],c], [[b,c],a], [[c,a],b]]

    # The method `minus` returns a triangulation with the given triangle
    # removed, if present.
