code: function flattenIterNodes(nodes) {
    var result = [];
    for (var i = 0; i < nodes.length; ++i) {
      if (nodes[i]._node.ctorName === '_iter') {
        result.push.apply(result, flattenIterNodes(nodes[i].children));
      } else {
        result.push(nodes[i]);
      }
    }
    return result;
  }
docs: Take an Array of nodes, and whenever an _iter node is encountered, splice in its recursively-flattened children instead.