Add function cogroup().

Added a TODO. The local variable will probably not work since it is similar to variable i. Unless there is a way to privatize the local variable to each iteration.