code: public <R> PromisesArray<R> map(final Function<T, Promise<R>> fun) {
          return mapSourcePromises(srcPromise -> new Promise<R>(resolver -> {
              srcPromise.then(t -> {
                  Promise<R> mapped = fun.apply(t);
                  mapped.then(t2 -> resolver.result(t2));
                  mapped.failure(e -> resolver.error(e));
              });
              srcPromise.failure(e -> resolver.error(e));
          }));
      }
docs: Map promises results to new promises
  
  @param fun mapping function
  @param <R> type of result promises
  @return PromisesArray