code: function iterate(node, test) {
  	const result = [];
  	let stack = node.children.slice().reverse(), ctx;
  
  	while (stack.length) {
  		ctx = stack.pop();
  		test(ctx) && result.push(ctx);
  		stack = stack.concat( ctx.children.slice().reverse() );
  	}
  
  	return result;
  }
docs: Iterates on each child node and its decendants and calls `test` function on them.
  If function returns `true`, node will be added to result
  NB: don’t use recursion here to avoid possible callstack size exceeding
  @param  {Node}     node
  @param  {Function} test
  @return {Node[]}