# Need help finding a pithy corouting example

**URL:** <https://www.ruby-forum.com/t/need-help-finding-a-pithy-corouting-example/152906>\
**Category:** Ruby\
**Created:** [November 9, 2008, 4:22pm UTC](https://www.ruby-forum.com/t/need-help-finding-a-pithy-corouting-example/152906 "2008-11-09T16:22:40Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![dirtytree](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@dirtytree](https://www.ruby-forum.com/u/dirtytree)\
**Post date:** [November 9, 2008, 4:22pm UTC](https://www.ruby-forum.com/t/need-help-finding-a-pithy-corouting-example/152906/1 "2008-11-09T16:22:40Z")

</div>

I’m looking for a concise but interesting example of corotuines to  
illustrate symmetrical fibers for the 1.9 edition of the PickAxe.

Way back in the dim past, I remember a logic puzzle to do with laying  
down a path of colored tiles such that there were no repeating  
subsequences. I remember coding a solution using coroutines in Simula.  
But I can’t now find a formulation of the problem. Does anyone know  
it? Or can anyone suggest an alternative illustration of coroutines  
that will fit in about 20-30 lines.?

Thanks

Dave

---

<div class="post-metadata">

**Author:** ![dirtytree](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@dirtytree](https://www.ruby-forum.com/u/dirtytree)\
**Post date:** [November 9, 2008, 5:30pm UTC](https://www.ruby-forum.com/t/need-help-finding-a-pithy-corouting-example/152906/2 "2008-11-09T17:30:43Z")

</div>

On Nov 9, 10:19 pm, Dave T. [removed\_email\_address@domain.invalid](mailto:removed_email_address@domain.invalid) wrote:

> Thanks
> 
> Dave

Chapter 9 - Coroutines in Programming in Lua has a few examples.

Chapter 13.4 in Teach Yourself Scheme in Fixnum days has a tree-  
matching example.

Both are available in online versions.

---

<div class="post-metadata">

**Author:** ![dirtytree](https://www.ruby-forum.com/letter_avatar_proxy/v4/letter/d/aeb1de/32.png) [@dirtytree](https://www.ruby-forum.com/u/dirtytree)\
**Post date:** [November 9, 2008, 5:50pm UTC](https://www.ruby-forum.com/t/need-help-finding-a-pithy-corouting-example/152906/3 "2008-11-09T17:50:05Z")

</div>

On Nov 9, 2008, at 10:27 AM, bullockbefriending bard wrote:

> Chapter 9 - Coroutines in Programming in Lua has a few examples.
> 
> Chapter 13.4 in Teach Yourself Scheme in Fixnum days has a tree-  
> matching example.
> 
> Both are available in online versions.

I should have said: I saw those, but I was looking for something a  
little more fun 🙂
