"use strict";
Object.defineProperty(exports, "__esModule", { value: true });
const Functional_1 = require("../../../../Class/Functional");
const _ids_1 = require("../../../_ids");
class Put extends Functional_1.Functional {
    constructor(system) {
        super({
            i: ['a', 'v', 'i'],
            o: ['a'],
        }, {}, system, _ids_1.ID_PUT);
    }
    f({ a, v, i }, done) {
        if (i < a.length) {
            const b = [...a];
            b[i] = v;
            done({ a: b });
        }
        else {
            done(undefined, 'index out of boundary');
        }
    }
}
exports.default = Put;
//# sourceMappingURL=index.js.map