pure/pure — pull request #16 by Technium (2012-03-29 13:41:26+00:00)
Title: Iterators with generator functions

I've added the ability to specify a generator function for an iterator, just as you can already do with filters. The list of items is then generated/fetched at render time, possibly based on other data present in the context.

```js
{
'tr': {
'row<-generator': {
'td.name': 'name',
generator: function (arg) { db.tables[arg.context.table.id] },
}
}
}
```

This feature is particularly useful for pulling items from a common data pool and removes the need to construct a context for of data for each template render. I use this to generically compile and render many instances of a number of different templates on-demand from one single function.