supercollider/supercollider — pull request #1233 by jamshark70 (2014-11-05 06:49:04+00:00)
Title: Classlib: Rest: Add 'value' method to simplify mixing rests and numbers

Without this commit, it's unnecessarily difficult to iterate over an array containing both numbers and rests.

a = [1, 2, Rest(3), 4];
a.sum; // binary operator '+' failed

// insane
a.sum { |item| if(item.isKindOf(Rest)) { item.dur } { item } };

With the change, you can just do `a.sum(_.value)`, piece of cake.