diff --git a/packages/core/pattern.mjs b/packages/core/pattern.mjs index a3798488..fc788751 100644 --- a/packages/core/pattern.mjs +++ b/packages/core/pattern.mjs @@ -714,21 +714,6 @@ export class Pattern { _velocity(velocity) { return this._withContext((context) => ({ ...context, velocity: (context.velocity || 1) * velocity })); } - - add(other) { - return this._asNumber()._opLeft(other, (a) => (b) => a + b); - } - - sub(other) { - return this._asNumber()._opLeft(other, (a) => (b) => a - b); - } - mul(other) { - return this._asNumber()._opLeft(other, (a) => (b) => a * b); - } - - div(other) { - return this._asNumber()._opLeft(other, (a) => (b) => a / b); - } } // pattern composers @@ -741,7 +726,6 @@ const composers = { }; for (const [name, op] of Object.entries(composers)) { - console.log(`Adding ${name}`); Pattern.prototype[name] = function (other) { return op[1](this)._opLeft(other, op[0]); }; diff --git a/packages/core/test/pattern.test.mjs b/packages/core/test/pattern.test.mjs index f2b255d2..e8e0ff0f 100644 --- a/packages/core/test/pattern.test.mjs +++ b/packages/core/test/pattern.test.mjs @@ -161,11 +161,11 @@ describe('Pattern', function () { assert.equal(pure(3).div(pure(2)).firstCycle()[0].value, 1.5); }); }); - describe('union()', function () { - it('Can union things', function () { + describe('set()', function () { + it('Can set things', function () { assert.deepStrictEqual( pure({ a: 4, b: 6 }) - .union(pure({ c: 7 })) + .set(pure({ c: 7 })) .firstCycle()[0].value, { a: 4, b: 6, c: 7 }, );