         trace -> "  Error in plus [#{@toSeq()?.join ', '}], (#{a}, #{b}, #{c})"
         throw new Error "Orientation mismatch."
       else
-        triangles = @triangles__.plus tri a, b, c
-        third = @third__.plusAll seq [[[a, b], c], [[b, c], a], [[c, a], b]]
-        new Triangulation triangles, third
+        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.

  # 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.

      if not equal @third(a, b), c
        this
      else
        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.
