 
 findDeps = (ctx) -> (names) ->
   auxiliaries = ctx.auxiliaries()
-  arrayToSet reverse join names, auxiliaryDependencies auxiliaries, names
-
-auxiliaryDependencies = (graph, names) ->
-  concat (for name in names
-    join (deps = ((lookupInMap graph, name)?.deps or [])),
-      auxiliaryDependencies graph, deps)
+  depSet = newSet()
+  auxiliaryDependencies auxiliaries, names, depSet
+  arrayToSet reverse setToArray depSet
+
+auxiliaryDependencies = (graph, names, allSet) ->
+  for name in names
+    if not inSet allSet, name
+      addToSet allSet, name
+      auxiliaryDependencies graph, ((lookupInMap graph, name)?.deps or []), allSet
+  return
+  # concat (for name in names
+  #   join (deps = ((lookupInMap graph, name)?.deps or [])),
+  #     auxiliaryDependencies graph, deps)
 
 ms.syntax = ms_syntax = (ctx, call) ->
   hasName = requireName ctx, 'Name required to declare a new syntax macro'

  """
  '3', 3

  # TODO: support matching with the same name
  #       to implement this we need the iife to take as arguments all variables
  #       with the same names, since JavaScript shadows it too strongly and

          nameCompile) ctx, atom, symbol
  if type
    atom.tea = mapOrigin type, atom
  atom.id = id if id?
  atom.scope = ctx.currentScopeIndex()
  if ctx.isOperator()
