# Iterable protocol and observable

**URL:** <https://talk.observablehq.com/t/iterable-protocol-and-observable/736>\
**Category:** Help\
**Created:** [May 9, 2018, 3:33pm UTC](https://talk.observablehq.com/t/iterable-protocol-and-observable/736 "2018-05-09T15:33:07Z")\
**Posts on this page:** 1\
**Showing post:** 3

<div class="post-metadata">

**Author:** ![mpj](https://yyz2.discourse-cdn.com/flex030/user_avatar/talk.observablehq.com/mpj/32/3540_2.png) [@mpj](https://talk.observablehq.com/u/mpj)\
**Post date:** [May 11, 2018, 9:49am UTC](https://talk.observablehq.com/t/iterable-protocol-and-observable/736/3 "2018-05-11T09:49:32Z")

</div>

> [@mbostock](#):
>
> You need to return a “generatorish” object rather than an iterable; specifically, Observable looks for the _generator_ .next and _generator_ .return functions to test whether a cell is a generator. Here’s a new notebook on custom generators and iterables:

Thank you, thats solves my problem!

Out of curiosity, why does it need to be generatorish and not just an iterator? What is the return method used for?

---

_[View the full topic](https://talk.observablehq.com/t/iterable-protocol-and-observable/736)._
