very, very minor but the example in the comment is wrong - should be 4:[3,2,1] instead of 4:[3,3,3]?