function transform(fn, value) {
    if (value instanceof AsyncHandle) {
      return value.then(function() { fn(value); });
    }
    return fn(value);
  }
Transform a value, whether the value is retrieved asynchronously or directly.

@private
@param {Function} fn The function that transforms the value.
@param {*} value The value to be transformed. This can be an {@link AsyncHandle} when the value
    is retrieved asynchronously, otherwise it can be anything.
@returns {*} An {@link AsyncHandle} when `value` is also an {@link AsyncHandle}, otherwise
    whatever `fn` resulted in.