 
   Z.mixin = tools.proc (hash) ->
     tools.pairs(hash).forEach ([name, func]) ->
-      funcsToApply[name] = func
+      mixedIn[name] = func
 
   Z
 

    resultingPromise = tools.objectCreate(overrideLayer)

    overrides.forEach (name) ->
      superMethod = resolvedObject[name]
      overrideLayer[name] = (args...) ->
        Z superMethod.apply(this, args)

    tools.pairs(funcsToApply).forEach ([name, func]) ->
      resultingPromise[name] = (args...) ->
        Z resultingPromise.then (resolved) ->
          func.apply({ value: resolved }, args)


init = ->

  mixedIn = {}

  Z = (obj) ->
    resolvedObject = resolveCompletely(obj)
