add Pattern.round

This commit is contained in:
Felix Roos 2022-03-04 00:07:00 +01:00
parent 52da8552ef
commit 0ef62708ab

View File

@ -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))
}