killdream/claire — pull request #23 by kennknowles (2013-05-12 16:30:26+00:00)
Title: bind :: Generator a -> (a -> Generator b) -> Generator b

This adds the bind function with a very weak test, but the code is pretty trivial.

I attempted to expose it also as the `then` method on the `Generator` class, but did run into problems with the object context. I am not so clear on when to use `value`, `make-value`, or `next` and what the appropriate values for the context are.

If you like this, please do fix my errors and expose it something like so:

```javascript
Generator = Base.derive {
....
then: (f) -> bind this f
....
}
```