flatten, removeAt, and init on scala.List