foreach syntax made consistent with scala.collections (https://github.com/scalanlp/breeze/issues/223)