   to reject and this is set to the object defined by rejectWith if that
   variant is used.
   ###
-  fail: (args...) ->
+  fail: (args...) =>
     return this if args.length == 0
     functions = flatten(args)
     if @_state == 'rejected'

  ###
  Returns the promise object of this Deferred.
  ###
  promise: ->
    @_promise or= new Promise(this)

  ###

  Notify progress callbacks with additional context. Works the same way as notify(),
  except this is set to context when calling the functions.
  ###
  notifyWith: (context, args...) =>
    return this if @_state != 'pending'
    @_progressCallbacks?.forEach (fn) ->
      fn.apply(context, args)
