mirror of
https://github.com/eliasstepanik/strudel-docker.git
synced 2026-01-25 12:38:35 +00:00
Make sequence a fastcat alias and change cat to be a slowcat ref #87
This commit is contained in:
parent
a4cacc079e
commit
4c43d3d850
@ -879,7 +879,7 @@ export function fastcat(...pats) {
|
|||||||
}
|
}
|
||||||
|
|
||||||
export function cat(...pats) {
|
export function cat(...pats) {
|
||||||
return fastcat(...pats);
|
return slowcat(...pats);
|
||||||
}
|
}
|
||||||
|
|
||||||
export function timeCat(...timepats) {
|
export function timeCat(...timepats) {
|
||||||
@ -895,6 +895,10 @@ export function timeCat(...timepats) {
|
|||||||
return stack(...pats);
|
return stack(...pats);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
export function sequence(...pats) {
|
||||||
|
return fastcat(...pats);
|
||||||
|
}
|
||||||
|
|
||||||
function _sequenceCount(x) {
|
function _sequenceCount(x) {
|
||||||
if (Array.isArray(x)) {
|
if (Array.isArray(x)) {
|
||||||
if (x.length == 0) {
|
if (x.length == 0) {
|
||||||
@ -908,10 +912,6 @@ function _sequenceCount(x) {
|
|||||||
return [reify(x), 1];
|
return [reify(x), 1];
|
||||||
}
|
}
|
||||||
|
|
||||||
export function sequence(...xs) {
|
|
||||||
return _sequenceCount(xs)[0];
|
|
||||||
}
|
|
||||||
|
|
||||||
export function polymeterSteps(steps, ...args) {
|
export function polymeterSteps(steps, ...args) {
|
||||||
const seqs = args.map((a) => _sequenceCount(a));
|
const seqs = args.map((a) => _sequenceCount(a));
|
||||||
if (seqs.length == 0) {
|
if (seqs.length == 0) {
|
||||||
|
|||||||
Loading…
x
Reference in New Issue
Block a user