src/await/makeAwaitFunc.js
function makeAwaitFunc(variant) {
    // Return an await function tailored to the given options.
    switch (variant) {
        case 'in': return getExtraInfo(traverseInPlace);
        case 'top': return function (n) { return getExtraInfo(traverseInPlace, n); };
        default: return getExtraInfo(traverseClone);
    }
}
function makeAwaitFunc(variant) {
    // Return an await function tailored to the given options.
    switch (variant) {
        case 'in': return getExtraInfo(traverseInPlace);
        case 'top': return function (n) { return getExtraInfo(traverseInPlace, n); };
        default: return getExtraInfo(traverseClone);
    }
}
Function for creating a specific variant of the await() function.
@param {string} variant - Recognised values: undefined, 'in', 'top'.