Revert "Another attempt at composable functions - WIP (#390)"

This reverts commit cbae355896.
This commit is contained in:
Felix Roos 2023-02-27 15:20:49 +01:00
parent fc71d349ed
commit 961bbf6f55
4 changed files with 108 additions and 326 deletions

View file

@ -45,9 +45,6 @@ import {
rev,
time,
run,
hitch,
set,
begin,
} from '../index.mjs';
import { steady } from '../signal.mjs';
@ -207,7 +204,7 @@ describe('Pattern', () => {
),
);
});
it('can squeezeout() structure', () => {
it('can SqueezeOut() structure', () => {
sameFirst(
sequence(1, [2, 3]).add.squeezeout(10, 20, 30),
sequence([11, [12, 13]], [21, [22, 23]], [31, [32, 33]]),
@ -255,7 +252,7 @@ describe('Pattern', () => {
),
);
});
it('can squeezeout() structure', () => {
it('can SqueezeOut() structure', () => {
sameFirst(sequence(1, [2, 3]).keep.squeezeout(10, 20, 30), sequence([1, [2, 3]], [1, [2, 3]], [1, [2, 3]]));
});
});
@ -297,7 +294,7 @@ describe('Pattern', () => {
),
);
});
it('can squeezeout() structure', () => {
it('can SqueezeOut() structure', () => {
sameFirst(sequence(1, [2, 3]).keepif.squeezeout(true, true, false), sequence([1, [2, 3]], [1, [2, 3]], silence));
});
});
@ -932,14 +929,6 @@ describe('Pattern', () => {
});
});
describe('alignments', () => {
it('Can combine controls', () => {
sameFirst(s('bd').set.in.n(3), s('bd').n(3));
sameFirst(s('bd').set.squeeze.n(3, 4), sequence(s('bd').n(3), s('bd').n(4)));
});
it('Can combine functions with alignmed controls', () => {
sameFirst(s('bd').apply(fast(2).set(n(3))), s('bd').fast(2).set.in.n(3));
sameFirst(s('bd').apply(fast(2).set.in.n(3)), s('bd').fast(2).set.in.n(3));
});
it('Can squeeze arguments', () => {
expect(sequence(1, 2).add.squeeze(4, 5).firstCycle()).toStrictEqual(sequence(5, 6, 6, 7).firstCycle());
});
@ -970,7 +959,7 @@ describe('Pattern', () => {
sameFirst(s('a', 'b').hurry(2), s('a', 'b').fast(2).speed(2));
});
});
describe('composable functions', () => {
/*describe('composable functions', () => {
it('Can compose functions', () => {
sameFirst(sequence(3, 4).fast(2).rev().fast(2), fast(2).rev().fast(2)(sequence(3, 4)));
});
@ -1012,5 +1001,5 @@ describe('Pattern', () => {
),
);
});
});
});*/
});