Generalize MergableWeighted class from lists to traversables