Skip to content

Instantly share code, notes, and snippets.

@sdether
Created January 12, 2012 06:52
Show Gist options
  • Select an option

  • Save sdether/1599109 to your computer and use it in GitHub Desktop.

Select an option

Save sdether/1599109 to your computer and use it in GitHub Desktop.
var source = new int[3, 4] { { 1, 2, 3, 4 }, { 5, 6, 7, 8 }, { 9, 10, 11, 12 } };
var destination = new int[6, 2];
var coordinator = new Coordinator<int[]>(
new Func<Coordinator<int[]>, IEnumerator>[] {
// Curry coroutine into common "shape"
c => Producer.Coroutine(source, c),
Exponentiator.Coroutine,
c => Consumer.Coroutine(destination, c)
}
);
coordinator.Execute();
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment