Minor syntax changes in k_means.k3.
Fix bug in fold1 implementation.
Implement groupByContiguous.