def map(&block)
      promise = Promise.new(@options)
      on_complete do |try|
        promise.complete!(try.map(&block))
      end

      promise.to_future
    end
def map(&block)
      promise = Promise.new(@options)
      on_complete do |try|
        promise.complete!(try.map(&block))
      end

      promise.to_future
    end
Creates a new future by applying a block to the successful result of
 this future. If this future is completed with an error then the new
 future will also contain this error.

 @return [Fear::Future]

 @example
   future = Fear.future { 2 }
   future.map { |v| v * 2 } #=> the same as Fear.future { 2 * 2 }