static function ofMany($futures, $gather = null) { if ($gather === null) { $gather = true; } $ret = tink_core__Future_Future_Impl_::sync(new _hx_array(array())); $_g = 0; while ($_g < $futures->length) { $f = $futures[$_g]; ++$_g; $ret = tink_core__Future_Future_Impl_::flatMap($ret, array(new _hx_lambda(array(&$_g, &$f, &$futures, &$gather, &$ret), "tink_core__Future_Future_Impl__5"), 'execute'), false); unset($f); } if ($gather) { return tink_core__Future_Future_Impl_::gather($ret); } else { return $ret; } }