   elements: -> @root?.elements()
 
   # Returns the elements in this set as an array.
-  toArray: ->
-    tmp = []
-    this.each (key) -> tmp.push(key)
-    tmp
+  toArray: -> @elements()?.toArray() or []
 
   # Returns true or false depending on whether the given key is an
   # element of this set.

  items: -> @root?.elements()

  # Returns the elements in this set as an array.
  toArray: ->
    tmp = []
    this.each (key) -> tmp.push(key)
    tmp

  # Returns true or false depending on whether the given key is an
  # element of this set.

  elements: -> @root?.elements()

  # Returns the elements in this set as an array.
  toArray: -> @elements()?.toArray() or []

  # Returns true or false depending on whether the given key is an
  # element of this set.
