pass all the args through patternify, to properly support sequences as args

This commit is contained in:
alex 2022-02-08 16:15:43 +00:00
parent 89ee94e953
commit d6c22d516b
2 changed files with 14 additions and 8 deletions

View file

@ -431,16 +431,16 @@ class Pattern {
return fastQuery.withEventTime(t => t.div(factor))
}
fast(factor) {
return this._patternify(Pattern.prototype._fast)(factor)
fast(...factor) {
return this._patternify(Pattern.prototype._fast)(...factor)
}
_slow(factor) {
return this._fast(1/factor)
}
slow(factor) {
return this._patternify(Pattern.prototype._slow)(factor)
slow(...factor) {
return this._patternify(Pattern.prototype._slow)(...factor)
}
_early(offset) {
@ -449,8 +449,8 @@ class Pattern {
return this.withQueryTime(t => t.add(offset)).withEventTime(t => t.sub(offset))
}
early(factor) {
return this._patternify(Pattern.prototype._early)(factor)
early(...factor) {
return this._patternify(Pattern.prototype._early)(...factor)
}
_late(offset) {
@ -459,8 +459,8 @@ class Pattern {
}
late(factor) {
return this._patternify(Pattern.prototype._late)(factor)
late(...factor) {
return this._patternify(Pattern.prototype._late)(...factor)
}
when(binary_pat, func) {