void fx_TypedArray_prototype_reduce(txMachine* the)
{
	mxTypedArrayDeclarations;
	txSlot* function = fxArgToCallback(the, 0);
	txInteger index = 0;
	if (mxArgc > 1)
		*mxResult = *mxArgv(1);
	else if (index < length) {
		(*dispatch->value.typedArray.dispatch->getter)(the, buffer->value.reference->next, view->value.dataView.offset, mxResult, EndianNative);
		index++;
	}
	else
		mxTypeError("no initial value");
	while (index < length) {
		fxReduceTypedArrayItem(the, function, dispatch, view, buffer->value.reference->next, index);
		index++;
	}
}
void fx_TypedArray_prototype_reduce(txMachine* the)
{
	mxTypedArrayDeclarations;
	txSlot* function = fxArgToCallback(the, 0);
	txInteger index = 0;
	if (mxArgc > 1)
		*mxResult = *mxArgv(1);
	else if (index < length) {
		(*dispatch->value.typedArray.dispatch->getter)(the, buffer->value.reference->next, view->value.dataView.offset, mxResult, EndianNative);
		index++;
	}
	else
		mxTypeError("no initial value");
	while (index < length) {
		fxReduceTypedArrayItem(the, function, dispatch, view, buffer->value.reference->next, index);
		index++;
	}
}