strudel-docker/repl/src/groove.ts
Felix Roos c11c217baf Pattern .define + .bootstrap
+ seperate parse / evaluate
+ add Pattern.edit
+ move string hacks to evaluate
+ automate eval scoping with globalThis
+ add random tune button
+ mini: handle angle brackets
+ add chordBass
+ fix old tunes
2022-02-15 23:05:14 +01:00

11 lines
321 B
TypeScript

import { Pattern as _Pattern } from '../../strudel.mjs';
const Pattern = _Pattern as any;
// is this the same as struct?
Pattern.prototype.groove = function (groove) {
return groove.fmap(() => (v) => v).appLeft(this);
};
Pattern.prototype.define('groove', (groove, pat) => pat.groove(groove), { composable: true });