es2015/clone.js
function cloneSet(source, traversedValues) {
  let clone = new Set()
  traversedValues.set(source, clone)
  
  cloneStructure(
    source.values(),
    entry => undefined,
    entry => clone.add(entry),
    traversedValues
  )
  
  return clone
}
function cloneSet(source, traversedValues) {
  let clone = new Set()
  traversedValues.set(source, clone)
  
  cloneStructure(
    source.values(),
    entry => undefined,
    entry => clone.add(entry),
    traversedValues
  )
  
  return clone
}
function cloneSet ( source , traversedValues ) { let clone = new Set ( ) traversedValues . set ( source , clone ) cloneStructure ( source . values ( ) , entry => undefined , entry => clone . add ( entry ) , traversedValues ) return clone }
Clones the provided set.

@param {Set<*>} source The set to clone.
@param {Map<Object, Object>} traversedValues A map of traversed
non-primitive keys and values. The keys are the keys and values
traversed in the source structure or structures referencing this
structure, the values are the clones of the keys and values.
@return {Set<*>} Source set clone.
Clones the provided set .