diff --git a/strudel.mjs b/strudel.mjs index 137efa4e..4179215b 100644 --- a/strudel.mjs +++ b/strudel.mjs @@ -505,6 +505,10 @@ class Pattern { return this._asNumber()._opleft(other, a => b => a / b) } + round() { + return this._asNumber().fmap((v) => Math.round(v)); + } + union(other) { return this._opleft(other, a => b => Object.assign({}, a, b)) }