A Monobloc snippet that demonstrates pattern matching with pattern guards. The match expression matches on a `beat` binding and returns a note (or not) depending on the value of `beat`.
Something went wrong. Try again.
match-with-guards.mblc
· Created 3mo ago ·372 B · 20 lines
1234567891011121314151617181920beat match { => beat with { beat 0.75 < } { f4♯ } => beat with { beat 1 >= beat 1.75 < and } { g4♯ } => beat with { beat 2 >= beat 2.75 < and } { c4♯ } => beat with { beat 3 >= beat 3.75 < and } { d4♯ } => beat with { beat 4 >= beat 4.75 < and } { c4♯ } => _ { 0 }}