squeezeBind itself + tidying

This commit is contained in:
alex 2022-04-12 12:00:39 +01:00
parent 8ea59067ce
commit 529d448383
2 changed files with 8 additions and 4 deletions

View file

@ -583,7 +583,7 @@ class Pattern {
return this.innerBind(id);
}
squeezeJoin() {
_squeezeJoin() {
const pat_of_pats = this;
function query(state) {
const haps = pat_of_pats.query(state);
@ -616,6 +616,10 @@ class Pattern {
return new Pattern(query);
}
_squeezeBind(func) {
return this.fmap(func).squeezeBind();
}
_apply(func) {
return func(this);
}
@ -678,7 +682,7 @@ class Pattern {
}
_ply(factor) {
return this.fmap(x => pure(x)._fast(factor)).squeezeJoin()
return this.fmap(x => pure(x)._fast(factor))._squeezeJoin()
}
// cpm = cycles per minute