   ###
   state: ->
     @_state
-  
+
   ###
   Convenience function to specify each done, fail and progress callbacks at the same time.
   ###

    @_alwaysCallbacks?.forEach (fn) =>
      fn.apply(@_context, args)
    this
    
  ###
  Resolves this Deferred object. If the object has already been rejected or resolved,
  nothing happens. Parameters passed to resolve will be handed to all current and
  future done and always callbacks. 
  ###
  resolve: (args...) =>
    @resolveWith(root, args...)
    this
    
  ###
  Resolve this Deferred with additional context. Works the same way as resolve, except
  the first parameter is used as this when calling the done and always callbacks.

              def.rejectWith.call(def, this, failArgs...)
        else
          def.rejectWith.call(def, this, result)
        def.rejectWith.call(def, this, args...)
      else
        def.rejectWith.call(def, this, args...)
    def.promise()

  ###
