"use strict";

module.exports = function (operations) {
	return function wrapWithOperation(name) {
		return function wrap(value) {
			// NOTE: It is important that we only do this lookup at wrapping time! Otherwise we don't have a guarantee that all the operation modules have been fully initialized yet, due to potential cyclical references or out-of-order loading.
			return operations[name](value);
		};
	};
};

