mirror of
https://codeberg.org/uzu/strudel
synced 2026-09-05 06:57:35 -04:00
overload every
This commit is contained in:
@@ -591,6 +591,10 @@ export class Pattern {
|
||||
}
|
||||
|
||||
every(n, func) {
|
||||
if (func instanceof Pattern) {
|
||||
const p = func;
|
||||
func = (x) => x.union(p);
|
||||
}
|
||||
const pat = this;
|
||||
const pats = Array(n - 1).fill(pat);
|
||||
pats.unshift(func(pat));
|
||||
|
||||
Reference in New Issue
Block a user